-
Notifications
You must be signed in to change notification settings - Fork 22
142 lines (124 loc) · 3.77 KB
/
windows-x86_64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: windows-x86_64
on:
pull_request:
paths-ignore:
- 'assets/**'
- '*.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:
- 'assets/**'
- '*.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.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