Skip to content

Commit bad1acd

Browse files
committed
Unify and optimize GitHub workflows:
- Consolidate `PPC_NUM_PROC` environment variable setup for functional and performance tests. - Standardize CMake configuration by deduplicating `-G Ninja` specification. - Update gcovr exclusions for more precise coverage reporting. - Add LLVM setup for Windows workflows to ensure correct compiler configuration.
1 parent ae3e432 commit bad1acd

File tree

6 files changed

+82
-42
lines changed

6 files changed

+82
-42
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ jobs:
3939
languages: ${{ matrix.language }}
4040
- name: CMake configure
4141
run: >
42-
cmake -S . -B build
42+
cmake -S . -B build -G Ninja
4343
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
44-
-G Ninja
4544
-D CMAKE_BUILD_TYPE=RELEASE
4645
env:
4746
CC: gcc-14

.github/workflows/mac.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ jobs:
2424
max-size: 1G
2525
- name: CMake configure
2626
run: >
27-
cmake -S . -B build
27+
cmake -S . -B build -G Ninja
2828
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
29-
-G Ninja -DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include"
29+
-DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include"
3030
-DCMAKE_CXX_FLAGS="-I$(brew --prefix)/opt/libomp/include"
31-
-D CMAKE_BUILD_TYPE=RELEASE
32-
-DCMAKE_INSTALL_PREFIX=install
31+
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install
3332
- name: Build project
3433
run: |
3534
cmake --build build --parallel
@@ -66,12 +65,11 @@ jobs:
6665
max-size: 1G
6766
- name: CMake configure
6867
run: >
69-
cmake -S . -B build
68+
cmake -S . -B build -G Ninja
7069
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
71-
-G Ninja -DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include"
70+
-DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include"
7271
-DCMAKE_CXX_FLAGS="-I$(brew --prefix)/opt/libomp/include"
73-
-D CMAKE_BUILD_TYPE=DEBUG
74-
-DCMAKE_INSTALL_PREFIX=install
72+
-D CMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=install
7573
- name: Build project
7674
run: |
7775
cmake --build build --parallel
@@ -131,18 +129,22 @@ jobs:
131129
- name: Run tests (threads, num_threads=1)
132130
run: python3 scripts/run_tests.py --running-type="threads"
133131
env:
132+
PPC_NUM_PROC: 1
134133
PPC_NUM_THREADS: 1
135134
- name: Run tests (threads, num_threads=2)
136135
run: python3 scripts/run_tests.py --running-type="threads"
137136
env:
137+
PPC_NUM_PROC: 1
138138
PPC_NUM_THREADS: 2
139139
- name: Run tests (threads, num_threads=3)
140140
run: python3 scripts/run_tests.py --running-type="threads"
141141
env:
142+
PPC_NUM_PROC: 1
142143
PPC_NUM_THREADS: 3
143144
- name: Run tests (threads, num_threads=4)
144145
run: python3 scripts/run_tests.py --running-type="threads"
145146
env:
147+
PPC_NUM_PROC: 1
146148
PPC_NUM_THREADS: 4
147149
macos-clang-test-extended:
148150
needs:
@@ -169,16 +171,20 @@ jobs:
169171
- name: Run tests (threads, num_threads=5)
170172
run: python3 scripts/run_tests.py --running-type="threads"
171173
env:
174+
PPC_NUM_PROC: 1
172175
PPC_NUM_THREADS: 5
173176
- name: Run tests (threads, num_threads=7)
174177
run: python3 scripts/run_tests.py --running-type="threads"
175178
env:
179+
PPC_NUM_PROC: 1
176180
PPC_NUM_THREADS: 7
177181
- name: Run tests (threads, num_threads=11)
178182
run: python3 scripts/run_tests.py --running-type="threads"
179183
env:
184+
PPC_NUM_PROC: 1
180185
PPC_NUM_THREADS: 11
181186
- name: Run tests (threads, num_threads=13)
182187
run: python3 scripts/run_tests.py --running-type="threads"
183188
env:
189+
PPC_NUM_PROC: 1
184190
PPC_NUM_THREADS: 13

.github/workflows/perf.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,12 @@ jobs:
1919
run: |
2020
mkdir -p install
2121
tar -xzvf ubuntu-gcc-install-ubuntu-24.04.tar.gz -C install
22-
- name: Run perf count checker
23-
run: |
24-
python3 scripts/run_perf_counter.py --required-tests-number=2
25-
env:
26-
PPC_NUM_THREADS: 2
27-
PPC_NUM_PROC: 2
2822
- name: Run perf tests
2923
run: |
3024
bash -e scripts/generate_perf_results.sh
3125
env:
32-
PPC_NUM_THREADS: 2
3326
PPC_NUM_PROC: 2
27+
PPC_NUM_THREADS: 2
3428
- name: Archive results
3529
uses: montudor/action-zip@v1
3630
with:

.github/workflows/static-analysis-pr.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
build_dir: build
2727
apt_packages: openmpi-bin,openmpi-common,libopenmpi-dev,ninja-build,libomp-19-dev,valgrind
2828
cmake_command: >
29-
cmake -S . -B build
29+
cmake -S . -B build -G Ninja
3030
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
31-
-G Ninja -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
31+
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
3232
config_file: .clang-tidy
3333
exclude: 3rdparty
3434
split_workflow: true
@@ -59,9 +59,8 @@ jobs:
5959
build_dir: build
6060
apt_packages: openmpi-bin,openmpi-common,libopenmpi-dev,ninja-build,libomp-19-dev,valgrind
6161
cmake_command: >
62-
cmake -S . -B build
62+
cmake -S . -B build -G Ninja
6363
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
64-
-G Ninja
6564
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
6665
config_file: .clang-tidy
6766
exclude: 3rdparty

.github/workflows/ubuntu.yml

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ jobs:
2424
max-size: 1G
2525
- name: CMake configure
2626
run: >
27-
cmake -S . -B build
27+
cmake -S . -B build -G Ninja
2828
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
29-
-G Ninja
3029
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install
3130
env:
3231
CC: gcc-14
@@ -76,9 +75,8 @@ jobs:
7675
max-size: 1G
7776
- name: CMake configure
7877
run: >
79-
cmake -S . -B build
78+
cmake -S . -B build -G Ninja
8079
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
81-
-G Ninja
8280
-D CMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=install
8381
env:
8482
CC: gcc-14
@@ -145,18 +143,22 @@ jobs:
145143
- name: Run func tests (threads, num_threads=1)
146144
run: python3 scripts/run_tests.py --running-type="threads"
147145
env:
146+
PPC_NUM_PROC: 1
148147
PPC_NUM_THREADS: 1
149148
- name: Run func tests (threads, num_threads=2)
150149
run: python3 scripts/run_tests.py --running-type="threads"
151150
env:
151+
PPC_NUM_PROC: 1
152152
PPC_NUM_THREADS: 2
153153
- name: Run func tests (threads, num_threads=3)
154154
run: python3 scripts/run_tests.py --running-type="threads"
155155
env:
156+
PPC_NUM_PROC: 1
156157
PPC_NUM_THREADS: 3
157158
- name: Run func tests (threads, num_threads=4)
158159
run: python3 scripts/run_tests.py --running-type="threads"
159160
env:
161+
PPC_NUM_PROC: 1
160162
PPC_NUM_THREADS: 4
161163
ubuntu-gcc-test-extended:
162164
needs:
@@ -183,18 +185,22 @@ jobs:
183185
- name: Run func tests (threads, num_threads=5)
184186
run: python3 scripts/run_tests.py --running-type="threads"
185187
env:
188+
PPC_NUM_PROC: 1
186189
PPC_NUM_THREADS: 5
187190
- name: Run func tests (threads, num_threads=7)
188191
run: python3 scripts/run_tests.py --running-type="threads"
189192
env:
193+
PPC_NUM_PROC: 1
190194
PPC_NUM_THREADS: 7
191195
- name: Run func tests (threads, num_threads=11)
192196
run: python3 scripts/run_tests.py --running-type="threads"
193197
env:
198+
PPC_NUM_PROC: 1
194199
PPC_NUM_THREADS: 11
195200
- name: Run func tests (threads, num_threads=13)
196201
run: python3 scripts/run_tests.py --running-type="threads"
197202
env:
203+
PPC_NUM_PROC: 1
198204
PPC_NUM_THREADS: 13
199205
ubuntu-clang-build:
200206
runs-on: ${{ matrix.os }}
@@ -220,9 +226,8 @@ jobs:
220226
max-size: 1G
221227
- name: CMake configure
222228
run: >
223-
cmake -S . -B build
229+
cmake -S . -B build -G Ninja
224230
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
225-
-G Ninja
226231
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install
227232
env:
228233
CC: clang-20
@@ -291,18 +296,22 @@ jobs:
291296
- name: Run tests (threads, num_threads=1)
292297
run: python3 scripts/run_tests.py --running-type="threads"
293298
env:
299+
PPC_NUM_PROC: 1
294300
PPC_NUM_THREADS: 1
295301
- name: Run tests (threads, num_threads=2)
296302
run: python3 scripts/run_tests.py --running-type="threads"
297303
env:
304+
PPC_NUM_PROC: 1
298305
PPC_NUM_THREADS: 2
299306
- name: Run tests (threads, num_threads=3)
300307
run: python3 scripts/run_tests.py --running-type="threads"
301308
env:
309+
PPC_NUM_PROC: 1
302310
PPC_NUM_THREADS: 3
303311
- name: Run tests (threads, num_threads=4)
304312
run: python3 scripts/run_tests.py --running-type="threads"
305313
env:
314+
PPC_NUM_PROC: 1
306315
PPC_NUM_THREADS: 4
307316
ubuntu-clang-test-extended:
308317
needs:
@@ -331,18 +340,22 @@ jobs:
331340
- name: Run tests (threads, num_threads=5)
332341
run: python3 scripts/run_tests.py --running-type="threads"
333342
env:
343+
PPC_NUM_PROC: 1
334344
PPC_NUM_THREADS: 5
335345
- name: Run tests (threads, num_threads=7)
336346
run: python3 scripts/run_tests.py --running-type="threads"
337347
env:
348+
PPC_NUM_PROC: 1
338349
PPC_NUM_THREADS: 7
339350
- name: Run tests (threads, num_threads=11)
340351
run: python3 scripts/run_tests.py --running-type="threads"
341352
env:
353+
PPC_NUM_PROC: 1
342354
PPC_NUM_THREADS: 11
343355
- name: Run tests (threads, num_threads=13)
344356
run: python3 scripts/run_tests.py --running-type="threads"
345357
env:
358+
PPC_NUM_PROC: 1
346359
PPC_NUM_THREADS: 13
347360
ubuntu-clang-sanitizer-build:
348361
needs:
@@ -371,9 +384,8 @@ jobs:
371384
max-size: 1G
372385
- name: CMake configure
373386
run: >
374-
cmake -S . -B build
387+
cmake -S . -B build -G Ninja
375388
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
376-
-G Ninja
377389
-D CMAKE_BUILD_TYPE=RELEASE -D ENABLE_ADDRESS_SANITIZER=ON -D ENABLE_UB_SANITIZER=ON
378390
-D CMAKE_INSTALL_PREFIX=install
379391
env:
@@ -432,27 +444,31 @@ jobs:
432444
- name: Run tests (threads, num_threads=1)
433445
run: python3 scripts/run_tests.py --running-type="threads"
434446
env:
447+
PPC_NUM_PROC: 1
435448
PPC_NUM_THREADS: 1
436449
PPC_ASAN_RUN: 1
437450
ASAN_OPTIONS: abort_on_error=1
438451
UBSAN_OPTIONS: halt_on_error=1
439452
- name: Run tests (threads, num_threads=2)
440453
run: python3 scripts/run_tests.py --running-type="threads"
441454
env:
455+
PPC_NUM_PROC: 1
442456
PPC_NUM_THREADS: 2
443457
PPC_ASAN_RUN: 1
444458
ASAN_OPTIONS: abort_on_error=1
445459
UBSAN_OPTIONS: halt_on_error=1
446460
- name: Run tests (threads, num_threads=3)
447461
run: python3 scripts/run_tests.py --running-type="threads"
448462
env:
463+
PPC_NUM_PROC: 1
449464
PPC_NUM_THREADS: 3
450465
PPC_ASAN_RUN: 1
451466
ASAN_OPTIONS: abort_on_error=1
452467
UBSAN_OPTIONS: halt_on_error=1
453468
- name: Run tests (threads, num_threads=4)
454469
run: python3 scripts/run_tests.py --running-type="threads"
455470
env:
471+
PPC_NUM_PROC: 1
456472
PPC_NUM_THREADS: 4
457473
PPC_ASAN_RUN: 1
458474
ASAN_OPTIONS: abort_on_error=1
@@ -485,21 +501,25 @@ jobs:
485501
- name: Run tests (threads, num_threads=5)
486502
run: python3 scripts/run_tests.py --running-type="threads"
487503
env:
504+
PPC_NUM_PROC: 1
488505
PPC_NUM_THREADS: 5
489506
PPC_ASAN_RUN: 1
490507
- name: Run tests (threads, num_threads=7)
491508
run: python3 scripts/run_tests.py --running-type="threads"
492509
env:
510+
PPC_NUM_PROC: 1
493511
PPC_NUM_THREADS: 7
494512
PPC_ASAN_RUN: 1
495513
- name: Run tests (threads, num_threads=11)
496514
run: python3 scripts/run_tests.py --running-type="threads"
497515
env:
516+
PPC_NUM_PROC: 1
498517
PPC_NUM_THREADS: 11
499518
PPC_ASAN_RUN: 1
500519
- name: Run tests (threads, num_threads=13)
501520
run: python3 scripts/run_tests.py --running-type="threads"
502521
env:
522+
PPC_NUM_PROC: 1
503523
PPC_NUM_THREADS: 13
504524
PPC_ASAN_RUN: 1
505525
ubuntu-gcc-build-codecov:
@@ -524,7 +544,7 @@ jobs:
524544
max-size: 1G
525545
- name: CMake configure
526546
run: >
527-
cmake -S . -B build
547+
cmake -S . -B build -G Ninja
528548
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
529549
-D CMAKE_BUILD_TYPE=RELEASE
530550
-D CMAKE_VERBOSE_MAKEFILE=ON -D USE_COVERAGE=ON
@@ -539,18 +559,22 @@ jobs:
539559
- name: Run tests (threads, num_threads=1)
540560
run: python3 scripts/run_tests.py --running-type="threads"
541561
env:
562+
PPC_NUM_PROC: 1
542563
PPC_NUM_THREADS: 1
543564
- name: Run tests (threads, num_threads=2)
544565
run: python3 scripts/run_tests.py --running-type="threads"
545566
env:
567+
PPC_NUM_PROC: 1
546568
PPC_NUM_THREADS: 2
547569
- name: Run tests (threads, num_threads=3)
548570
run: python3 scripts/run_tests.py --running-type="threads"
549571
env:
572+
PPC_NUM_PROC: 1
550573
PPC_NUM_THREADS: 3
551574
- name: Run tests (threads, num_threads=4)
552575
run: python3 scripts/run_tests.py --running-type="threads"
553576
env:
577+
PPC_NUM_PROC: 1
554578
PPC_NUM_THREADS: 4
555579
- name: Generate gcovr Coverage Data
556580
run: |
@@ -559,14 +583,12 @@ jobs:
559583
gcovr -r ../ \
560584
--exclude '.*3rdparty/.*' \
561585
--exclude '/usr/.*' \
562-
--exclude '.*/perf_tests/.*' \
563-
--exclude '.*/func_tests/.*' \
564-
--exclude '.*/all/runner.cpp' \
565-
--exclude '.*/mpi/runner.cpp' \
566-
--exclude '.*/omp/runner.cpp' \
567-
--exclude '.*/seq/runner.cpp' \
568-
--exclude '.*/stl/runner.cpp' \
569-
--exclude '.*/tbb/runner.cpp' \
586+
--exclude '.*tasks/.*/tests/.*' \
587+
--exclude '.*modules/.*/tests/.*' \
588+
--exclude '.*tasks/common/runners/.*' \
589+
--exclude '.*modules/core/util/include/perf_test_util.hpp' \
590+
--exclude '.*modules/core/util/include/func_test_util.hpp' \
591+
--exclude '.*modules/core/util/src/func_test_util.cpp' \
570592
--xml --output ../coverage.xml \
571593
--html=../cov-report/index.html --html-details
572594
- name: Upload coverage reports to Codecov

0 commit comments

Comments
 (0)