Skip to content

Commit

Permalink
set correct elixir module name in evision_${name}_Instance
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Jan 12, 2023
1 parent 57b0812 commit a2a847e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-precompile-gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
id: cache-mix-compile_opencv
uses: actions/cache@v3
with:
key: precompile-opencv-${{ env.OPENCV_VER }}-${{ matrix.pair.arch }}-${{ hashFiles('cc_toolchain/*linux-gnu.cmake') }}-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
key: precompiled-opencv-${{ env.OPENCV_VER }}-${{ matrix.pair.arch }}-${{ hashFiles('cc_toolchain/*linux-gnu.cmake') }}-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
path: |
./_build/${{ env.MIX_ENV }}/lib/evision
./c_src/headers.txt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-precompile-musl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
id: cache-mix-compile_opencv
uses: actions/cache@v3
with:
key: precompile-opencv-${{ env.OPENCV_VER }}-${{ runner.os }}-x86_64-linux-musl-${{ hashFiles('cc_toolchain/**') }}-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
key: precompiled-opencv-${{ env.OPENCV_VER }}-${{ runner.os }}-x86_64-linux-musl-${{ hashFiles('cc_toolchain/**') }}-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
path: |
./_build/${{ env.MIX_ENV }}/lib/evision
./c_src/headers.txt
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
id: cache-mix-compile_opencv
uses: actions/cache@v3
with:
key: precompile-opencv-${{ env.OPENCV_VER }}-${{ matrix.arch }}-${{ hashFiles('cc_toolchain/*linux-musl.cmake') }}-${{ hashFiles('cc_toolchain/zig.toolchain.cmake') }}-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
key: precompiled-opencv-${{ env.OPENCV_VER }}-${{ matrix.arch }}-${{ hashFiles('cc_toolchain/*linux-musl.cmake') }}-${{ hashFiles('cc_toolchain/zig.toolchain.cmake') }}-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
path: |
./_build/${{ env.MIX_ENV }}/lib/evision
./c_src/headers.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
id: cache-mix-compile_opencv
uses: actions/cache@v3
with:
key: compile-opencv-${{ env.OPENCV_VER }}-x86_64-linux-gnu-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
key: compiled-opencv-${{ env.OPENCV_VER }}-x86_64-linux-gnu-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
path: |
./_build/${{ env.MIX_ENV }}/lib/evision
./c_src/headers.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-precompile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
id: cache-mix-compile_opencv
uses: actions/cache@v3
with:
key: precompile-opencv-${{ env.OPENCV_VER }}-${{ matrix.pair.arch }}-apple-darwin-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
key: precompiled-opencv-${{ env.OPENCV_VER }}-${{ matrix.pair.arch }}-apple-darwin-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
path: |
./_build/${{ env.MIX_ENV }}/lib/evision
./c_src/headers.txt
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/macos-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
id: cache-mix-compile_opencv
uses: actions/cache@v3
with:
key: compile-with-ffmpeg-opencv-macos-12-noopt-${{ runner.os }}-${{ env.OPENCV_VER }}-x86_64-apple-darwin-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
key: compiled-with-ffmpeg-opencv-${{ env.OPENCV_VER }}-x86_64-apple-darwin-${{ hashFiles('Makefile') }}-${{ hashFiles('py_src/*.py') }}
path: |
./_build/${{ env.MIX_ENV }}/lib/evision
./c_src/headers.txt
Expand Down Expand Up @@ -129,14 +129,3 @@ jobs:
# export BEAM_SMP="$(find "${ERL_BASE}" -name beam.smp)"
# codesign -s - -f --entitlements tmp.entitlements "${BEAM_SMP}"
find ./test -name '*_test.exs' -exec bash -c "echo {} && mix test --include require_downloading --include require_ffmpeg {}" \;
- name: Mix Test with winograd
run: |
export ENABLE_WINOGRAD=yes
mix test --include require_downloading --include require_ffmpeg test/dnn_detection_model_test.exs || true
mix test --include require_downloading --include require_ffmpeg test/dnn_detection_test.exs || true
mix test --include require_downloading --include require_ffmpeg test/dnn_text_detection_model_db_test.exs || true
mix test --include require_downloading --include require_ffmpeg test/dnn_text_detection_model_east_test.exs || true
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
2 changes: 1 addition & 1 deletion .github/workflows/windows-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
id: cache-mix-compile
uses: actions/cache@v3
with:
key: compile-opencv-${{ env.OPENCV_VER }}-x86_64-windows-msvc-${{ hashFiles('Makefile.win') }}-${{ hashFiles('py_src/*.py') }}
key: compiled-opencv-${{ env.OPENCV_VER }}-x86_64-windows-msvc-${{ hashFiles('Makefile.win') }}-${{ hashFiles('py_src/*.py') }}
path: |
./_build/${{ env.MIX_ENV }}/lib/evision
./c_src/headers.txt
Expand Down
4 changes: 2 additions & 2 deletions c_src/erlcompat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ ERL_NIF_TERM evision_from(ErlNifEnv *env, const TYPE& src)
evision_res<STORAGE> * VAR; \
VAR = (decltype(VAR))enif_alloc_resource(evision_res<STORAGE>::type, \
sizeof(evision_res<STORAGE>)); \
if (!VAR) return evision::nif::error(env, "no memory"); \
if (!VAR) return evision::nif::error(env, "out of memory"); \
new (&(VAR->val)) STORAGE(r); \
ERL_NIF_TERM ret = enif_make_resource(env, VAR); \
enif_release_resource(VAR); \
bool success; \
ERL_NIF_TERM map = evision_from_as_map(env, r, ret, #MODULE_NAME, success); \
ERL_NIF_TERM map = evision_from_as_map(env, r, ret, "Elixir.Evision." #MODULE_NAME, success); \
return map; \
} \
static void destruct_##NAME(ErlNifEnv *env, void *args) \
Expand Down

0 comments on commit a2a847e

Please sign in to comment.