-
Notifications
You must be signed in to change notification settings - Fork 280
124 lines (108 loc) · 5.03 KB
/
ci_windows.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
name: Windows
on: [push]
jobs:
build-windows-msvc:
strategy:
matrix:
include:
- occ_version: 7.3.0
assimp_version: 5.4.3
- occ_version: 7.4.0
assimp_version: 5.4.3
- occ_version: 7.5.0
assimp_version: 5.4.3
- occ_version: 7.6.0
assimp_version: 5.4.3
- occ_version: 7.7.0
assimp_version: 5.4.3
- occ_version: 7.8.0
assimp_version: 5.4.3
- occ_version: 7.8.0
assimp_version: 5.3.1
runs-on: windows-latest
name: build-win-msvc-occt${{matrix.occ_version}}-assimp${{matrix.assimp_version}}
steps:
- name: Set globals
id: globals
shell: cmd
run: |
if "%occ_version%"=="7.3.0" (
echo "occ_zip_sha256=2503e69d595bb4c4e760b629aba3d8cee5e6b8d0da43b0d790a7949c67fd15d0" >> "${GITHUB_OUTPUT}"
) else if "%occ_version%"=="7.4.0" (
echo "occ_zip_sha256=6664b9a4213036ff0960edd2426258cf66844386c1a2338fa62e008f40c476bb" >> "${GITHUB_OUTPUT}"
) else if "%occ_version%"=="7.5.0" (
echo "occ_zip_sha256=8000f261ecbf6689e48439aa5895304069d00a14efe28eb7f1d108450cb7a74f" >> "${GITHUB_OUTPUT}"
) else if "%occ_version%"=="7.6.0" (
echo "occ_zip_sha256=137788c7693f74fb98797adfd06c1b00f66dac59beca5c3073c1f62c98b7a80f" >> "${GITHUB_OUTPUT}"
) else if "%occ_version%"=="7.7.0" (
echo "occ_zip_sha256=82afb7bd5fd7097189ee4e98bf3bc02b4030cae7a82967db68d5f2b556801779" >> "${GITHUB_OUTPUT}"
) else if "%occ_version%"=="7.8.0" (
echo "occ_zip_sha256=beb30920efe5e5384d500d43dcb8ba1f476a76bb65b268b1af32d807b697bdee" >> "${GITHUB_OUTPUT}"
)
if "%assimp_version%"=="5.3.1" (
echo "assimp_zip_sha256=b6097488fa5b7a0cc610e8258e74aaa9552b48a13bc8680eedd66512d788e64f" >> "${GITHUB_OUTPUT}"
) else if "%assimp_version%"=="5.4.3" (
echo "assimp_zip_sha256=b321031eba023d8874ed794aa9aad5b6b132b2e4b8835ecc99ba428be48d0305" >> "${GITHUB_OUTPUT}"
)
- name: Checkout
uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: QtCache
- name: Cache OpenCascade archive
id: cache-occ
uses: actions/cache@v3
with:
path: OpenCASCADE-${{matrix.occ_version}}-vc14-64.zip
key: occ-${{matrix.occ_version}}
- name: Download OpenCascade
if: steps.cache-occ.outputs.cache-hit != 'true'
uses: carlosperate/download-file-action@v2
with:
file-url: 'https://www.fougue.pro/share/bin/OpenCASCADE-${{matrix.occ_version}}-vc14-64.zip'
sha256: ${{steps.globals.outputs.occ_zip_sha256}}
- name: Extract OpenCascade
run: 7z x OpenCASCADE-${{matrix.occ_version}}-vc14-64.zip
- name: Cache Assimp archive
id: cache-assimp
uses: actions/cache@v3
with:
path: assimp-${{matrix.assimp_version}}.zip
key: assimp-${{matrix.assimp_version}}
- name: Download Assimp
if: steps.cache-assimp.outputs.cache-hit != 'true'
uses: carlosperate/download-file-action@v2
with:
file-url: 'https://www.fougue.pro/share/bin/assimp-${{matrix.assimp_version}}.zip'
sha256: ${{steps.globals.outputs.assimp_zip_sha256}}
- name: Extract Assimp
run: 7z x assimp-${{matrix.assimp_version}}.zip
- name: Get count of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: Configure Compiler
uses: ilammy/msvc-dev-cmd@v1
- name: Build
shell: cmd
run: |
mkdir ${{github.workspace}}\build
cd ${{github.workspace}}\build
set assimp_version=${{matrix.assimp_version}}
cmake --version
cmake .. ^
-DMayo_BuildTests=ON ^
-DMayo_BuildPluginAssimp=ON ^
-DMayo_PostBuildCopyRuntimeDLLs=ON ^
-DOpenCASCADE_DIR=../OpenCASCADE-${{matrix.occ_version}}-vc14-64/opencascade-${{matrix.occ_version}} ^
-Dassimp_DIR=${{github.workspace}}/assimp-${{matrix.assimp_version}}/lib/cmake/assimp-%assimp_version:~0,3%
cmake --build . ^
--config Debug ^
--parallel ${{steps.cpu-cores.outputs.count}}
- name: Execute Unit Tests
working-directory: ${{github.workspace}}/build
shell: cmd
run: |
debug\mayo.exe --runtests -o utests-output.txt
more utests-output.txt