fix face module inheritance #835
Workflow file for this run
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
name: macos-x86_64 | |
on: | |
pull_request: | |
paths-ignore: | |
- 'assets/**' | |
- '*.md' | |
- '**/*.md' | |
- 'LICENSE*' | |
- 'examples/**' | |
- 'nerves/**' | |
- 'Makefile.win' | |
- 'cc_toolchain/**' | |
- 'c_src/windows_fix/windows_fix.cpp' | |
- 'checksum.exs' | |
- 'do_release.sh' | |
- '.github/FUNDING.yml' | |
- '.github/workflows/nerves-*.yml' | |
- '.github/workflows/linux-*.yml' | |
- '.github/workflows/windows-*.yml' | |
- '.github/workflows/test-*.yml' | |
- '.github/workflows/macos-precompile.yml' | |
- '.github/workflows/macos-apple-device-precompile.yml' | |
- '.github/*manylinux*.sh' | |
push: | |
branches: | |
- main | |
- test-* | |
paths-ignore: | |
- 'assets/**' | |
- '*.md' | |
- '**/*.md' | |
- 'LICENSE*' | |
- 'examples/**' | |
- 'nerves/**' | |
- 'Makefile.win' | |
- 'cc_toolchain/**' | |
- 'c_src/windows_fix/windows_fix.cpp' | |
- 'checksum.exs' | |
- '.github/FUNDING.yml' | |
- '.github/workflows/nerves-*.yml' | |
- '.github/workflows/linux-*.yml' | |
- '.github/workflows/windows-*.yml' | |
- '.github/workflows/test-*.yml' | |
- '.github/workflows/macos-precompile.yml' | |
- '.github/*manylinux*.sh' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
mix_test: | |
runs-on: macos-12 | |
env: | |
OPENCV_VER: "4.10.0" | |
MIX_ENV: "test" | |
EVISION_PREFER_PRECOMPILED: "false" | |
FFMPEG_VER: "5" | |
OTP_VERSION: "25.3.2.2" | |
ELIXIR_VERSION: "1.15.2" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install FFmpeg, Erlang and Elixir | |
run: | | |
brew install autoconf coreutils curl git openssl wxwidgets asdf ffmpeg eigen | |
brew link ffmpeg | |
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git | |
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git | |
export KERL_CONFIGURE_OPTIONS="--disable-debug --without-javac" | |
asdf install erlang ${{ env.OTP_VERSION }} | |
asdf install elixir ${{ env.ELIXIR_VERSION }} | |
asdf global erlang ${{ env.OTP_VERSION }} | |
asdf global elixir ${{ env.ELIXIR_VERSION }} | |
source $(brew --prefix asdf)/libexec/asdf.sh | |
mix local.hex --force | |
mix local.rebar --force | |
- name: Cache mix packages | |
id: cache-mix-deps | |
uses: actions/cache@v4 | |
with: | |
key: deps-${{ hashFiles('mix.lock') }} | |
path: | | |
./deps | |
- name: Get mix deps | |
if: steps.cache-mix-deps.outputs.cache-hit != 'true' | |
run: | | |
source $(brew --prefix asdf)/libexec/asdf.sh | |
mix deps.get | |
- name: Cache OpenCV source code | |
id: cache-opencv | |
uses: actions/cache@v4 | |
with: | |
key: opencv-with-contrib-${{ env.OPENCV_VER }} | |
path: | | |
./3rd_party | |
- name: Download OpenCV source code | |
if: steps.cache-opencv.outputs.cache-hit != 'true' | |
run: | | |
bash scripts/download_opencv.sh ${OPENCV_VER} 3rd_party/cache 3rd_party/opencv/ | |
bash scripts/download_opencv_contrib.sh ${OPENCV_VER} 3rd_party/cache 3rd_party/opencv/ | |
- name: Cache compiled OpenCV | |
id: cache-mix-compile_opencv | |
uses: actions/cache@v4 | |
with: | |
key: compiled-with-ffmpeg${{ env.FFMPEG_VER }}-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 | |
./c_src/configuration.private.hpp | |
- name: Compile OpenCV | |
if: steps.cache-mix-compile_opencv.outputs.cache-hit != 'true' | |
run: | | |
source $(brew --prefix asdf)/libexec/asdf.sh | |
mix compile_opencv | |
- name: Mix Compile | |
run: | | |
source $(brew --prefix asdf)/libexec/asdf.sh | |
rm -f _build/test/lib/evision/priv/evision.so | |
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: | | |
source $(brew --prefix asdf)/libexec/asdf.sh | |
mix compile --force --no-optional-deps | |
- name: Cache testdata | |
id: cache-mix-testdata | |
uses: actions/cache@v4 | |
with: | |
key: testdata-${{ hashFiles('test/downloading_list.txt') }} | |
path: | | |
./test/testdata | |
- name: Mix Test | |
run: | | |
# ulimit -c unlimited | |
# /usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow bool true" tmp.entitlements | |
# sudo touch /cores/test | |
# export ERL_BASE="$(dirname $(dirname $(which erl)))" | |
# export BEAM_SMP="$(find "${ERL_BASE}" -name beam.smp)" | |
# codesign -s - -f --entitlements tmp.entitlements "${BEAM_SMP}" | |
source $(brew --prefix asdf)/libexec/asdf.sh | |
find ./test -name '*_test.exs' -exec bash -c "echo {} && mix test --include require_downloading --include require_ffmpeg {}" \; |