This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
464 lines (410 loc) · 18.9 KB
/
continuous-integration.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
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
name: continuous-integration
on:
push:
branches: [ master, develop, omnitrace ]
pull_request:
branches: [ master, develop, omnitrace ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linux-ci:
runs-on: ubuntu-20.04
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- CC: clang-9
CXX: clang++-9
PYTHON_VERSION: '3.6'
BUILD_TYPE: 'MinSizeRel'
PACKAGES: 'clang-9 build-essential libopenmpi-dev openmpi-bin openmpi-common libfabric-dev ccache graphviz'
BUILD_ARGS: '--quick --build-libs shared --mpi --gotcha --tools mallocp mpip ompt --cxx-standard=17'
CTEST_ARGS: '-V --output-on-failure'
CONFIG_ARGS: '-DTIMEMORY_CCACHE_BUILD=ON'
- CC: clang-10
CXX: clang++-10
PYTHON_VERSION: '3.7'
BUILD_TYPE: 'Release'
PACKAGES: 'clang-10 build-essential ccache graphviz'
BUILD_ARGS: '--minimal --build-libs shared static --python --gotcha --stats --unwind --tools mallocp --cxx-standard=17'
CTEST_ARGS: '-V --output-on-failure'
CONFIG_ARGS: '-DTIMEMORY_CCACHE_BUILD=ON -DTIMEMORY_UNITY_BUILD=OFF -DTIMEMORY_BUILD_PYTHON_UNITY=OFF'
- CC: clang-11
CXX: clang++-11
PYTHON_VERSION: '3.7'
BUILD_TYPE: 'Release'
PACKAGES: 'clang-11 build-essential ccache graphviz'
BUILD_ARGS: '--minimal --build-libs shared static --stats --tools kokkos-config timem --cxx-standard=17'
CONFIG_ARGS: '-DTIMEMORY_CCACHE_BUILD=ON'
- CC: gcc-7
CXX: g++-7
FC: gfortran-7
PYTHON_VERSION: '3.6'
BUILD_TYPE: 'Debug'
PACKAGES: 'gcc-7 g++-7 gfortran-7 build-essential libmpich-dev mpich libtbb-dev libpapi-dev papi-tools lcov ccache graphviz'
BUILD_ARGS: '--minimal --build-libs shared --mpi --papi --gotcha --unwind --tools mpip --stats --cxx-standard=17 --coverage'
CTEST_ARGS: '-V --output-on-failure'
CONFIG_ARGS: '-DCMAKE_C_FLAGS=-Og -DCMAKE_CXX_FLAGS=-Og'
- CC: gcc-8
CXX: g++-8
FC: gfortran-8
PYTHON_VERSION: '3.7'
BUILD_TYPE: 'Release'
PACKAGES: 'gcc-8 g++-8 gfortran-8 build-essential libmpich-dev mpich ccache graphviz'
BUILD_ARGS: '--minimal --build-libs shared --mpi --gotcha --stats --tools compiler --cxx-standard=17'
CTEST_ARGS: '-V --output-on-failure'
CONFIG_ARGS: '-DTIMEMORY_CCACHE_BUILD=ON'
- CC: gcc-9
CXX: g++-9
FC: gfortran-9
PYTHON_VERSION: '3.7'
BUILD_TYPE: 'MinSizeRel'
PACKAGES: 'gcc-9 g++-9 gfortran-9 build-essential ccache graphviz'
BUILD_ARGS: '--minimal --build-libs shared --gotcha --stats --python --unwind --cxx-standard=17'
CTEST_ARGS: '-V --output-on-failure'
CONFIG_ARGS: '-DTIMEMORY_CCACHE_BUILD=ON -DTIMEMORY_BUILD_PYTHON_UNITY=OFF'
- CC: gcc-10
CXX: g++-10
FC: gfortran-10
PYTHON_VERSION: '3.7'
BUILD_TYPE: 'Release'
PACKAGES: 'gcc-10 g++-10 gfortran-10 build-essential libtbb-dev ccache graphviz'
BUILD_ARGS: '--minimal --build-libs shared --python --arch --extra-optimizations --caliper --unwind --cxx-standard=17'
CTEST_ARGS: '-V --output-on-failure'
CONFIG_ARGS: '-DTIMEMORY_CCACHE_BUILD=ON -DTIMEMORY_BUILD_PYTHON_UNITY=OFF'
env:
CC: ${{ matrix.CC }}
FC: ${{ matrix.FC }}
CXX: ${{ matrix.CXX }}
CTEST_ARGS: "${{ matrix.CTEST_ARGS }}"
steps:
- name: Setup Environment
run: |
echo "PATH=${HOME}/miniconda/bin:${PATH}" >> $GITHUB_ENV
echo "CMAKE_ARGS=-DCMAKE_INSTALL_PREFIX=${HOME}/timemory-install -DTIMEMORY_SOCKET_TESTS=OFF ${{ matrix.CONFIG_ARGS }}" >> $GITHUB_ENV
echo "PYCTEST_ARGS=-SF --pyctest-drop-site=my.cdash.org --pyctest-model=Continuous --pyctest-site=GitHub -j 1 --compile-time-perf ${HOME}/ctp -cc ${{ matrix.CC }} -cxx ${{ matrix.CXX }} --pyctest-build-type=${{ matrix.BUILD_TYPE }} ${{ matrix.BUILD_ARGS }}" >> $GITHUB_ENV
env | sort
- name: Checkout Code
uses: actions/checkout@v3
with:
clean: true
- name: Update container
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.PACKAGES }}
sudo scripts/linux-ci.sh
- name: Install PyCTest
run: |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p ${HOME}/miniconda
conda config --set always_yes yes --set changeps1 no
conda create -c conda-forge -c defaults -n pyctest python=${{ matrix.PYTHON_VERSION }} pyctest
- name: Install Requirements
run: |
source activate
conda activate pyctest
python -m pip install -r requirements.txt
python -m pip install pytest
- name: Build and Test
run: |
source activate
conda activate pyctest
echo -e "Running command:\n$(which python) ./pyctest-runner.py ${PYCTEST_ARGS} -- ${CTEST_ARGS} -- ${CMAKE_ARGS}"
python ./pyctest-runner.py ${PYCTEST_ARGS} -- ${CTEST_ARGS} -- ${CMAKE_ARGS}
- name: Update Log
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
for i in $(find Testing | grep LastUpdate); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Configure Log
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
for i in $(find Testing | grep LastConfigure); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Build Log
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
for i in $(find Testing | grep LastBuild); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Test Log
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
for i in $(find Testing | grep LastTest); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Validate Build
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
source activate
conda activate pyctest
cmake --build . --target all --parallel $(nproc)
- name: Test Install
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
source activate
conda activate pyctest
cmake --build . --target install --parallel $(nproc)
- name: Validate Tests
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
source activate
conda activate pyctest
if [ -n "$(find Testing | grep LastTestsFailed.log)" ]; then
ctest --rerun-failed -V -N;
ctest --rerun-failed -V;
fi
- name: Test Python Build
if: ${{ matrix.BUILD_TYPE != 'Debug' }}
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
source activate
conda activate pyctest
if [ -f "tests/test-python-install-import.cmake" ]; then
cmake -P tests/test-python-install-import.cmake;
PYTHONPATH=. $(which pytest) -s;
fi
- name: Import Python Install
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
source activate
conda activate pyctest
if [ -f "tests/test-python-install-import.cmake" ]; then
cd;
export PYTHONPATH="${HOME}/timemory-install/lib/python${{ matrix.PYTHON_VERSION }}/site-packages:${PYTHONPATH}"
python -c "import timemory; print(timemory.__file__)";
fi
- name: Test Examples
working-directory: ${{github.workspace}}/examples
run: |
cmake -B build-examples -DTIMEMORY_BUILD_C_EXAMPLES=ON -Dtimemory_DIR=${HOME}/timemory-install/share/cmake/timemory .
cmake --build build-examples --target ex_array_of_bundles --parallel 2
ubuntu-latest:
runs-on: ubuntu-latest
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- CC: clang
CXX: clang++
PYTHON_VERSION: '3.10'
BUILD_TYPE: 'Release'
PACKAGES: 'clang build-essential ccache graphviz'
BUILD_ARGS: '--minimal --build-libs shared --python --gotcha --unwind --stats --tools avail timem --cxx-standard=17'
CTEST_ARGS: '-V --output-on-failure'
CONFIG_ARGS: '-DTIMEMORY_CCACHE_BUILD=ON -DTIMEMORY_UNITY_BUILD=OFF -DTIMEMORY_BUILD_PYTHON_UNITY=OFF'
- CC: gcc
CXX: g++
FC: gfortran
PYTHON_VERSION: '3.10'
BUILD_TYPE: 'Release'
PACKAGES: 'gcc g++ gfortran build-essential ccache graphviz'
BUILD_ARGS: '--minimal --build-libs shared --python --gotcha --unwind --stats --tools avail timem --cxx-standard=17'
CTEST_ARGS: '-V --output-on-failure'
CONFIG_ARGS: '-DTIMEMORY_CCACHE_BUILD=ON -DTIMEMORY_UNITY_BUILD=OFF -DTIMEMORY_BUILD_PYTHON_UNITY=OFF'
env:
CC: ${{ matrix.CC }}
FC: ${{ matrix.FC }}
CXX: ${{ matrix.CXX }}
CTEST_ARGS: "${{ matrix.CTEST_ARGS }}"
steps:
- name: Setup Environment
run: |
echo "PATH=${HOME}/miniconda/bin:${PATH}" >> $GITHUB_ENV
echo "CMAKE_ARGS=-DCMAKE_INSTALL_PREFIX=${HOME}/timemory-install -DTIMEMORY_SOCKET_TESTS=OFF ${{ matrix.CONFIG_ARGS }}" >> $GITHUB_ENV
echo "PYCTEST_ARGS=-SF --pyctest-drop-site=my.cdash.org --pyctest-model=Continuous --pyctest-site=GitHub --pyctest-build-name ubuntu-latest-${{ matrix.CC }} -j 1 --compile-time-perf ${HOME}/ctp -cc ${{ matrix.CC }} -cxx ${{ matrix.CXX }} --pyctest-build-type=${{ matrix.BUILD_TYPE }} ${{ matrix.BUILD_ARGS }}" >> $GITHUB_ENV
env | sort
- name: Checkout Code
uses: actions/checkout@v3
with:
clean: true
- name: Update container
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.PACKAGES }} build-essential wget curl git-core cmake ninja-build python3-pip
sudo -H python3 -m pip install -U cmake
- name: Install PyCTest
run: |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p ${HOME}/miniconda
conda config --set always_yes yes --set changeps1 no
conda create -c conda-forge -c defaults -n pyctest python=${{ matrix.PYTHON_VERSION }} pyctest
- name: Install Requirements
run: |
source activate
conda activate pyctest
python -m pip install -r requirements.txt
python -m pip install pytest
- name: Build and Test
run: |
source activate
conda activate pyctest
echo -e "Running command:\n$(which python) ./pyctest-runner.py ${PYCTEST_ARGS} -- ${CTEST_ARGS} -- ${CMAKE_ARGS}"
python ./pyctest-runner.py ${PYCTEST_ARGS} -- ${CTEST_ARGS} -- ${CMAKE_ARGS}
- name: Update Log
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
for i in $(find Testing | grep LastUpdate); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Configure Log
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
for i in $(find Testing | grep LastConfigure); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Build Log
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
for i in $(find Testing | grep LastBuild); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Test Log
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
for i in $(find Testing | grep LastTest); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Validate Build
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
source activate
conda activate pyctest
cmake --build . --target all --parallel $(nproc)
- name: Test Install
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
source activate
conda activate pyctest
cmake --build . --target install --parallel $(nproc)
- name: Validate Tests
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
source activate
conda activate pyctest
if [ -n "$(find Testing | grep LastTestsFailed.log)" ]; then
ctest --rerun-failed -V -N;
ctest --rerun-failed -V;
fi
- name: Test Python Build
if: ${{ matrix.BUILD_TYPE != 'Debug' }}
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
source activate
conda activate pyctest
if [ -f "tests/test-python-install-import.cmake" ]; then
cmake -P tests/test-python-install-import.cmake;
PYTHONPATH=. $(which pytest) -s;
fi
- name: Import Python Install
working-directory: ${{github.workspace}}/build-timemory/Linux
run: |
source activate
conda activate pyctest
if [ -f "tests/test-python-install-import.cmake" ]; then
cd;
export PYTHONPATH="${HOME}/timemory-install/lib/python${{ matrix.PYTHON_VERSION }}/site-packages:${PYTHONPATH}"
python -c "import timemory; print(timemory.__file__)";
fi
- name: Test Examples
working-directory: ${{github.workspace}}/examples
run: |
cmake -B build-examples -DTIMEMORY_BUILD_C_EXAMPLES=ON -Dtimemory_DIR=${HOME}/timemory-install/share/cmake/timemory .
cmake --build build-examples --target ex_array_of_bundles --parallel 2
macos-ci:
runs-on: macos-latest
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- BUILD_TYPE: 'Release'
BUILD_ARGS: '--build-libs shared --tools avail timem --cxx-standard=17'
CTEST_ARGS: '-V --output-on-failure'
CONFIG_ARGS: '-DTIMEMORY_BUILD_{CALIPER,COMPILER_INSTRUMENTATION}=OFF -DTIMEMORY_BUILD_PYTHON_HATCHET=OFF'
PYTHON_VERSION: '3.8'
steps:
- name: Setup Environment
run: |
echo "PATH=${HOME}/miniconda/bin:${PATH}" >> $GITHUB_ENV
echo "CMAKE_ARGS=-DCMAKE_INSTALL_PREFIX=${HOME}/timemory-install -DTIMEMORY_SOCKET_TESTS=OFF -DCMAKE_CXX_FLAGS=-Wno-format ${{ matrix.CONFIG_ARGS }}" >> $GITHUB_ENV
echo "PYCTEST_ARGS=-SF --pyctest-drop-site=my.cdash.org --pyctest-model=Continuous --pyctest-site=GitHub -j 1 --compile-time-perf ${HOME}/ctp --pyctest-build-type=${{ matrix.BUILD_TYPE }} ${{ matrix.BUILD_ARGS }}" >> $GITHUB_ENV
env | sort
- name: Checkout Code
uses: actions/checkout@v3
with:
clean: true
- name: Install PyCTest
run: |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p ${HOME}/miniconda
conda config --set always_yes yes --set changeps1 no
conda create -c defaults -c conda-forge -n pyctest python=${{ matrix.PYTHON_VERSION }} pyctest
- name: Install Requirements
run: |
source activate
conda activate pyctest
python -m pip install -r requirements.txt
python -m pip install pytest
- name: Checkout Code
uses: actions/checkout@v3
with:
clean: true
- name: Build and Test
run: |
export CONTINUOUS_INTEGRATION=true
source activate
conda activate pyctest
echo -e "Running command:\n$(which python) ./pyctest-runner.py ${PYCTEST_ARGS} -- ${CTEST_ARGS} -- ${CMAKE_ARGS}"
python ./pyctest-runner.py ${PYCTEST_ARGS} -- ${CTEST_ARGS} -- ${CMAKE_ARGS}
- name: Update Log
working-directory: ${{github.workspace}}/build-timemory/Darwin
run: |
for i in $(find Testing | grep LastUpdate); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Configure Log
working-directory: ${{github.workspace}}/build-timemory/Darwin
run: |
for i in $(find Testing | grep LastConfigure); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Build Log
working-directory: ${{github.workspace}}/build-timemory/Darwin
run: |
for i in $(find Testing | grep LastBuild); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Test Log
working-directory: ${{github.workspace}}/build-timemory/Darwin
run: |
for i in $(find Testing | grep LastTest); do echo "##### File: ${i} #####"; cat ${i}; done
- name: Validate Build
working-directory: ${{github.workspace}}/build-timemory/Darwin
run: |
source activate
conda activate pyctest
cmake --build . --target all --parallel $(nproc)
- name: Test Install
working-directory: ${{github.workspace}}/build-timemory/Darwin
run: |
source activate
conda activate pyctest
cmake --build . --target install --parallel $(nproc)
- name: Validate Tests
working-directory: ${{github.workspace}}/build-timemory/Darwin
run: |
source activate
conda activate pyctest
if [ -n "$(find Testing | grep LastTestsFailed.log)" ]; then
ctest --rerun-failed -V -N;
ctest --rerun-failed -V;
fi
- name: Test Python Build
if: ${{ matrix.BUILD_TYPE != 'Debug' }}
working-directory: ${{github.workspace}}/build-timemory/Darwin
run: |
source activate
conda activate pyctest
if [ -f "tests/test-python-install-import.cmake" ]; then
cmake -P tests/test-python-install-import.cmake;
PYTHONPATH=. $(which pytest) -s;
fi
- name: Import Python Install
working-directory: ${{github.workspace}}/build-timemory/Darwin
run: |
source activate
conda activate pyctest
if [ -f "tests/test-python-install-import.cmake" ]; then
cd;
export PYTHONPATH="${HOME}/timemory-install/lib/python${{ matrix.PYTHON_VERSION }}/site-packages:${PYTHONPATH}"
python -c "import timemory; print(timemory.__file__)";
fi
- name: Test Examples
working-directory: ${{github.workspace}}/examples
run: |
cmake -B build-examples -DTIMEMORY_BUILD_C_EXAMPLES=ON -Dtimemory_DIR=${HOME}/timemory-install/share/cmake/timemory .
cmake --build build-examples --target ex_array_of_bundles --parallel 2