-
Notifications
You must be signed in to change notification settings - Fork 177
372 lines (371 loc) · 13.6 KB
/
cmake.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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
name: CMake Build
on: [push, pull_request]
env:
WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18599/w_BaseKit_p_2022.1.3.210_offline.exe
WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18578/w_HPCKit_p_2022.1.3.145_offline.exe
LINUX_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18487/l_BaseKit_p_2022.1.2.146_offline.sh
LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18479/l_HPCKit_p_2022.1.2.117_offline.sh
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18341/m_HPCKit_p_2022.1.0.86_offline.dmg
WINDOWS_CPP_COMPONENTS: intel.oneapi.win.cpp-compiler
WINDOWS_FORTRAN_COMPONENTS: intel.oneapi.win.ifort-compiler
WINDOWS_DPCPP_COMPONENTS: intel.oneapi.win.dpcpp-compiler
LINUX_CPP_COMPONENTS: intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
LINUX_FORTRAN_COMPONENTS: intel-oneapi-compiler-fortran
LINUX_DPCPP_COMPONENTS: intel-oneapi-compiler-dpcpp-cpp
LINUX_CPP_COMPONENTS_WEB: intel.oneapi.lin.dpcpp-cpp-compiler-pro
LINUX_FORTRAN_COMPONENTS_WEB: intel.oneapi.lin.ifort-compiler
LINUX_DPCPP_COMPONENTS_WEB: intel.oneapi.lin.dpcpp-cpp-compiler
MACOS_CPP_COMPONENTS: intel.oneapi.mac.cpp-compiler
MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler
CACHE_NUMBER: 2
COMPILER_VERSION: 2022.0.3
BUILD_TYPE: Release
jobs:
build_unix_gcc:
name: build ${{ matrix.os }} - lua=${{ matrix.lua }} - gcc
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
lua:
- on
- off
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install linux deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install build-essential freeglut3-dev libx11-dev libxmu-dev libxi-dev libglew-dev libgd-dev liblua5.4-dev
- name: set macos gcc
if: runner.os == 'macOS'
shell: bash
run: |
echo "CC=gcc-11" >> $GITHUB_ENV
echo "CXX=g++-11" >> $GITHUB_ENV
- name: set linux gcc
if: runner.os == 'Linux'
shell: bash
run: |
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
- name: Build
shell: bash
run: |
cmake -B ${{github.workspace}}/cbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }}
cmake --build ${{github.workspace}}/cbuild -j4
cp ${{github.workspace}}/cbuild/smokeview smokeview
- name: Download test data
working-directory: ${{github.workspace}}/Tests
run: ./get_test_data.sh
- name: Test
shell: bash
working-directory: ${{github.workspace}}/cbuild
run: |
ctest -j10 --output-on-failure -V
- name: Set exec suffix
if: ${{ matrix.lua }}
run: echo "exec_suffix=-lua" >> $GITHUB_ENV
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: smokeview-${{ runner.os }}-${{ env.exec_suffix }}
path: smokeview
build_unix_rpm_gcc:
name: build (rpm) ${{ matrix.os }} - lua=${{ matrix.lua }} - gcc
runs-on: ubuntu-latest
container: centos:7
strategy:
fail-fast: false
matrix:
lua:
- on
- off
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install linux deps
run: |
yum -y install epel-release
yum -y install cmake3
yum -y install make gcc-c++ mesa-libGL-devel glut-devel libjpeg-devel libpng-devel gd-devel glew-devel libXmu-devel libXi-devel lua-devel
yum -y install wget unzip git
- name: set gcc
shell: bash
run: |
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
- name: Build
shell: bash
run: |
cmake3 -B ${{github.workspace}}/cbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }}
cmake3 --build ${{github.workspace}}/cbuild -j4
cp ${{github.workspace}}/cbuild/smokeview smokeview
# - name: Download test data
# working-directory: ${{github.workspace}}/Tests
# run: ./get_test_data.sh
# - name: Test
# shell: bash
# working-directory: ${{github.workspace}}/cbuild
# run: |
# ctest -j10 --output-on-failure -V
- name: Set exec suffix
if: ${{ matrix.lua }}
run: echo "exec_suffix=-lua" >> $GITHUB_ENV
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: smokeview-${{ runner.os }}-${{ env.exec_suffix }}
path: smokeview
build_unix_rpm_intel:
name: build (rpm) ${{ matrix.os }} - lua=${{ matrix.lua }} - intel
runs-on: ubuntu-latest
container: centos:7
strategy:
fail-fast: false
matrix:
lua:
- on
- off
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install linux deps
run: |
yum -y install epel-release
yum -y install cmake3
yum -y install make gcc-c++ mesa-libGL-devel glut-devel libjpeg-devel libpng-devel gd-devel glew-devel libXmu-devel libXi-devel lua-devel
yum -y install wget unzip git
- name: Add intel RPM repo
run: |
tee > /tmp/oneAPI.repo << EOF
[oneAPI]
name=Intel® oneAPI repository
baseurl=https://yum.repos.intel.com/oneapi
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
EOF
mv /tmp/oneAPI.repo /etc/yum.repos.d
- name: General update
run: yum -y makecache
- run: yum install -y environment-modules intel-oneapi-compiler-dpcpp-cpp-2023.1.0
- run: /opt/intel/oneapi/modulefiles-setup.sh
- name: Build
shell: bash
run: |
. /etc/profile.d/modules.sh
module use /opt/intel/oneapi/modulefiles
module load compiler
CC=icx CXX=icx cmake3 -B ${{github.workspace}}/cbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }}
cmake3 --build ${{github.workspace}}/cbuild -j4
cp ${{github.workspace}}/cbuild/smokeview smokeview
# - name: Download test data
# working-directory: ${{github.workspace}}/Tests
# run: ./get_test_data.sh
# - name: Test
# shell: bash
# working-directory: ${{github.workspace}}/cbuild
# run: |
# ctest -j10 --output-on-failure -V
- name: Set exec suffix
if: ${{ matrix.lua }}
run: echo "exec_suffix=-lua" >> $GITHUB_ENV
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: smokeview-${{ runner.os }}-${{ env.exec_suffix }}
path: smokeview
build_unix_intel:
name: build ${{ matrix.os }} - lua=${{ matrix.lua }} - intel
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
lua:
- on
- off
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: prepare for cache restore
run: |
sudo mkdir -p /opt/intel
sudo chown $USER /opt/intel
- name: cache install
if: runner.os == 'macOS'
id: cache-install-macos
uses: actions/cache@v2
with:
path: /opt/intel/oneapi
key: install2-${{ env.MACOS_HPCKIT_URL }}-${{ env.MACOS_CPP_COMPONENTS }}
- name: cache install
if: runner.os == 'Linux'
id: cache-install-linux
uses: actions/cache@v2
with:
path: /opt/intel/oneapi
key: install2-${{ env.LINUX_HPCKIT_URL }}-${{ env.LINUX_CPP_COMPONENTS }}
- name: install
if: runner.os == 'macOS' && steps.cache-install-macos.outputs.cache-hit != 'true'
run: bash .github/workflows/install_macos_oneapi.sh $MACOS_HPCKIT_URL
- name: install
if: runner.os == 'Linux' && steps.cache-install-linux.outputs.cache-hit != 'true'
run: bash .github/workflows/install_linux_oneapi.sh $LINUX_HPCKIT_URL
- name: set macos compilers
if: runner.os == 'macOS'
shell: bash
run: |
echo "CC=icc" >> $GITHUB_ENV
echo "CXX=icpc" >> $GITHUB_ENV
- name: set linux intel compiler
if: runner.os == 'Linux'
shell: bash
run: |
echo "CC=icx" >> $GITHUB_ENV
echo "CXX=icx" >> $GITHUB_ENV
- name: Build
shell: bash
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install build-essential freeglut3-dev libx11-dev libxmu-dev libxi-dev libgl1-mesa-dev libglew-dev libgd-dev liblua5.4-dev
- name: Build
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
cmake -B ${{github.workspace}}/cbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }}
cmake --build ${{github.workspace}}/cbuild -j4
cp ${{github.workspace}}/cbuild/smokeview smokeview
- name: Download test data
working-directory: ${{github.workspace}}/Tests
run: ./get_test_data.sh
- name: Test
shell: bash
working-directory: ${{github.workspace}}/cbuild
run: |
source /opt/intel/oneapi/setvars.sh
ctest -j10 --output-on-failure
- name: Set exec suffix
if: ${{ matrix.lua }} == lua
run: echo "exec_suffix=-lua" >> $GITHUB_ENV
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: smokeview-${{ runner.os }}-${{ env.exec_suffix }}
path: smokeview
build_windows_intel:
name: build ${{ matrix.os }} - lua=${{ matrix.lua }} - intel
strategy:
fail-fast: false
matrix:
os:
- windows-2019
lua:
- on
- off
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: cache install
id: cache-install
uses: actions/cache@v2
with:
path: |
C:\Program Files (x86)\Intel\oneAPI\setvars.bat
C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat
C:\Program Files (x86)\Intel\oneAPI\compiler
key: install-${{ env.CACHE_NUMBER }}-${{ env.WINDOWS_HPCKIT_URL }}-${{ env.WINDOWS_CPP_COMPONENTS }}-compiler-${{ hashFiles('**/scripts/cache_exclude_windows.sh') }}
- name: install
if: steps.cache-install.outputs.cache-hit != 'true'
run: .github/workflows/install_windows_oneapi.bat $WINDOWS_HPCKIT_URL $WINDOWS_CPP_COMPONENTS
- name: Make latest link
shell: cmd
run: |
rmdir "C:\Program Files (x86)\Intel\oneAPI\compiler\latest"
mklink /D "C:\Program Files (x86)\Intel\oneAPI\compiler\latest" "C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.3"
- name: build smokeview lua
shell: cmd
run: |
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
ninja --version
cmake --version
cmake -B ${{github.workspace}}\cbuild -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }}
cmake --build ${{github.workspace}}\cbuild -j4
copy ${{github.workspace}}\cbuild\smokeview.exe smokeview.exe
- name: Download test data
working-directory: ${{github.workspace}}/Tests
shell: pwsh
run: .\get_test_data.ps1
- name: Test
shell: bash
working-directory: ${{github.workspace}}/cbuild
run: |
ctest -j10 --output-on-failure
- name: Set exec suffix
if: ${{ matrix.lua }} == lua
run: echo "exec_suffix=-lua" >> $GITHUB_ENV
- name: exclude unused files from cache
if: steps.cache-install.outputs.cache-hit != 'true'
shell: bash
run: .github/workflows/cache_exclude_windows.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: smokeview-windows${{ env.exec_suffix }}
path: smokeview.exe
build_windows_msvc:
name: build ${{ matrix.os }} - lua=${{ matrix.lua }} - msvc
strategy:
fail-fast: false
matrix:
os:
- windows-2022
lua:
- on
- off
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: build smokeview lua
shell: cmd
run: |
cmake --version
cmake -B ${{github.workspace}}\cbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }}
cmake --build ${{github.workspace}}\cbuild -j4 --config ${{env.BUILD_TYPE}}
copy ${{github.workspace}}\cbuild\Release\smokeview.exe smokeview.exe
- name: Download test data
working-directory: ${{github.workspace}}/Tests
shell: pwsh
run: .\get_test_data.ps1
- name: Test
shell: bash
working-directory: ${{github.workspace}}/cbuild
env:
LUA: ${{ matrix.lua }}
run: |
ctest -j10 -C ${{env.BUILD_TYPE}} --output-on-failure
- name: Set exec suffix
if: ${{ matrix.lua }}
run: echo "exec_suffix=-lua" >> $GITHUB_ENV
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: smokeview-windows-msvc-${{ env.exec_suffix }}
path: smokeview.exe