-
Notifications
You must be signed in to change notification settings - Fork 1
193 lines (164 loc) · 5.55 KB
/
continuous.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
name: Build
on:
push:
branches: [main]
pull_request:
env:
CTEST_OUTPUT_ON_FAILURE: ON
CTEST_PARALLEL_LEVEL: 1
jobs:
####################
# Linux
####################
Linux:
name: ${{ matrix.name }} (${{ matrix.config }}, ${{ matrix.threading }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
config: [DebugNoSymbols, Release]
threading: [TBB]
include:
- os: ubuntu-latest
name: Linux
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 10
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get -o Acquire::Retries=3 install ccache
echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV"
- name: Cache Build
id: cache-build
uses: actions/[email protected]
if: matrix.config == 'Release' # debug cache is not working
with:
path: ${{ env.CACHE_PATH }}
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.threading }}-cache-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.threading }}-cache
- name: Prepare ccache
run: |
# ccache --max-size=1.0G
ccache -V && ccache --show-stats && ccache --zero-stats
- name: Configure
run: |
mkdir -p build
cd build
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
-DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="" \
-DPOLYFEM_THREADING=${{ matrix.threading }}
- name: Build
run: cd build; make -j2; ccache --show-stats
- name: Tests
run: cd build; OMP_NUM_THREADS=1 ctest --verbose --output-on-failure
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
####################
# MacOS
####################
MacOS:
name: ${{ matrix.os }} (${{ matrix.config }}, ${{ matrix.threading }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, macos-14]
config: [DebugNoSymbols, Release]
threading: [TBB]
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 10
- name: Dependencies
run: |
brew install ccache
echo 'CACHE_PATH=~/Library/Caches/ccache' >> "$GITHUB_ENV"
- name: Cache Build
id: cache-build
uses: actions/[email protected]
with:
path: ${{ env.CACHE_PATH }}
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.threading }}-cache-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.threading }}-cache
- name: Prepare ccache
run: |
ccache --max-size=1.0G
ccache -V && ccache --show-stats && ccache --zero-stats
- name: Configure
run: |
mkdir -p build
cd build
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
-DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="" \
-DPOLYFEM_THREADING=${{ matrix.threading }}
- name: Build
run: cd build; make -j2; ccache --show-stats
- name: Tests
run: cd build; ctest --verbose --output-on-failure
####################
# Windows
####################
Windows:
runs-on: windows-2022
env:
SCCACHE_IDLE_TIMEOUT: "12000"
strategy:
fail-fast: false
matrix:
config: [DebugNoSymbols]
threading: [CPP]
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 10
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Dependencies
run: |
choco install ccache
"CACHE_PATH=${env:LOCALAPPDATA}\ccache" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Cache build
id: cache-build
uses: actions/[email protected]
with:
path: ${{ env.CACHE_PATH }}
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.threading }}-cache-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.threading }}-cache
- name: Prepare ccache
run: |
ccache --max-size=1.0G
ccache -V && ccache --show-stats && ccache --zero-stats
- name: Configure
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^
-DCMAKE_CONFIGURATION_TYPES="Release;Debug;RelWithDebInfo;MinSizeRel;DebugNoSymbols" ^
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
-DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="/Od" -DCMAKE_EXE_LINKER_FLAGS_DEBUGNOSYMBOLS="" ^
-DPOLYFEM_WITH_CLIPPER=OFF ^
-DPOLYFEM_THREADING=${{ matrix.threading }} ^
-DPOLYSOLVE_WITH_CHOLMOD=OFF ^
-DPOLYSOLVE_WITH_AMGCL=OFF ^
-DPOLYSOLVE_WITH_MKL=ON ^
-B build ^
-S .
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
cmake --build build -j2 && ccache --show-stats
- name: Tests
run: cd build; ctest --verbose --output-on-failure