use opencv 4.9.0 by default #500
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: windows-x86_64 | |
on: | |
pull_request: | |
paths-ignore: | |
- '*.md' | |
- '**/*.md' | |
- 'LICENSE*' | |
- 'examples/**' | |
- 'nerves/**' | |
- 'Makefile' | |
- 'cc_toolchain/**' | |
- 'checksum.exs' | |
- '.github/FUNDING.yml' | |
- '.github/workflows/nerves-*.yml' | |
- '.github/workflows/linux-*.yml' | |
- '.github/workflows/macos-*.yml' | |
- '.github/workflows/test-*.yml' | |
- '.github/workflows/windows-precompile.yml' | |
- '.github/*manylinux*.sh' | |
push: | |
branches: | |
- main | |
- test-* | |
paths-ignore: | |
- '*.md' | |
- '**/*.md' | |
- 'LICENSE*' | |
- 'examples/**' | |
- 'nerves/**' | |
- 'Makefile' | |
- 'cc_toolchain/**' | |
- 'checksum.exs' | |
- '.github/FUNDING.yml' | |
- '.github/workflows/nerves-*.yml' | |
- '.github/workflows/linux-*.yml' | |
- '.github/workflows/macos-*.yml' | |
- '.github/workflows/test-*.yml' | |
- '.github/workflows/windows-precompile-cuda.yml' | |
- '.github/workflows/windows-precompile.yml' | |
- '.github/*manylinux*.sh' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
mix_test: | |
runs-on: windows-latest | |
env: | |
MIX_ENV: test | |
OPENCV_VER: "4.9.0" | |
OTP_VERSION: "25.2" | |
ELIXIR_VERSION: "1.14.3" | |
EVISION_PREFER_PRECOMPILED: "false" | |
MAKE: "nmake" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ env.OTP_VERSION }} | |
elixir-version: ${{ env.ELIXIR_VERSION }} | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
- name: Cache mix packages | |
id: cache-mix-deps | |
uses: actions/cache@v3 | |
with: | |
key: deps-${{ hashFiles('mix.lock') }}-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }} | |
path: | | |
./deps | |
- name: Get mix deps | |
if: steps.cache-mix-deps.outputs.cache-hit != 'true' | |
shell: bash | |
run: | | |
mix deps.get | |
- name: Cache OpenCV source code | |
id: cache-opencv | |
uses: actions/cache@v3 | |
with: | |
key: opencv-${{ env.OPENCV_VER }} | |
path: | | |
./3rd_party | |
- name: Download OpenCV source code | |
if: steps.cache-opencv.outputs.cache-hit != 'true' | |
shell: bash | |
run: | | |
bash scripts/download_opencv.sh ${OPENCV_VER} 3rd_party/cache 3rd_party/opencv/ | |
- name: Cache compiled OpenCV | |
id: cache-mix-compile | |
uses: actions/cache@v3 | |
with: | |
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 | |
./c_src/configuration.private.hpp | |
- name: Compile OpenCV | |
if: steps.cache-mix-compile_opencv.outputs.cache-hit != 'true' | |
shell: bash | |
run: | | |
rm -f Makefile | |
mix compile_opencv | |
- name: Mix Compile | |
shell: bash | |
run: | | |
rm -f Makefile | |
rm -f "_build/${MIX_ENV}/lib/evision/priv/evision.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 | |
- name: Cache testdata | |
id: cache-mix-testdata | |
uses: actions/cache@v3 | |
with: | |
key: testdata-${{ hashFiles('test/downloading_list.txt') }} | |
path: | | |
./test/testdata | |
- name: Mix Test | |
shell: bash | |
run: | | |
mix test --include require_downloading --include require_ffmpeg --exclude may_crash |