-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
51 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,8 @@ jobs: | |
MAKE: "nmake" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: erlef/setup-beam@v1 | ||
with: | ||
|
@@ -119,14 +120,17 @@ jobs: | |
run: | | ||
rm -f Makefile | ||
rm -f "_build/${MIX_ENV}/lib/evision/priv/evision.dll" | ||
rm -f "_build/${MIX_ENV}/lib/evision/priv/windows_fix.dll" | ||
rm -rf lib/generated && rm -rf src/generated | ||
mkdir -p lib/generated && mkdir -p src/generated | ||
mix compile | ||
- name: Compile once again but without optional deps | ||
run: mix compile --force --warnings-as-errors --no-optional-deps | ||
shell: bash | ||
run: | | ||
mix compile --force --warnings-as-errors --no-optional-deps | ||
- name: Cache testdata | ||
id: cache-mix-testdata | ||
|
@@ -140,3 +144,16 @@ jobs: | |
shell: bash | ||
run: | | ||
mix test --include require_downloading --include require_ffmpeg --exclude may_crash | ||
- name: Create tarball | ||
if: always() | ||
shell: bash | ||
run: | | ||
tar -czf evision-x86_64-windows-msvc.tar.gz -C "_build/${MIX_ENV}/lib/evision" . | ||
- name: Upload build artifacts | ||
if: always() | ||
uses: actions/[email protected] | ||
with: | ||
name: evision-x86_64-windows-msvc.tar.gz | ||
path: evision-x86_64-windows-msvc.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-module(evision_windows_fix). | ||
-compile(nowarn_export_all). | ||
-compile([export_all]). | ||
|
||
-on_load(init/0). | ||
|
||
-define(APPNAME, evision). | ||
-define(LIBNAME, windows_fix). | ||
|
||
init() -> | ||
SoName = case code:priv_dir(?APPNAME) of | ||
{error, bad_name} -> | ||
case filelib:is_dir(filename:join(["..", priv])) of | ||
true -> | ||
filename:join(["..", priv, ?LIBNAME]); | ||
_ -> | ||
filename:join([priv, ?LIBNAME]) | ||
end; | ||
Dir -> | ||
filename:join(Dir, ?LIBNAME) | ||
end, | ||
erlang:load_nif(SoName, 0). | ||
|
||
not_loaded(Line) -> | ||
erlang:nif_error({not_loaded, [{module, ?MODULE}, {line, Line}]}). | ||
|
||
run_once() -> | ||
not_loaded(?LINE). |