Skip to content

Commit 679eb07

Browse files
authored
[CI] Split CI into stages (#189)
1 parent 221dda2 commit 679eb07

File tree

4 files changed

+96
-88
lines changed

4 files changed

+96
-88
lines changed

Diff for: .github/workflows/main.yml

+94
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,27 @@ concurrency:
1212
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
1313

1414
jobs:
15+
clang-format:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: DoozyX/[email protected]
20+
with:
21+
source: '.'
22+
python-lint:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Setup environment
27+
run: |
28+
python3 -m pip install flake8
29+
- name: Run linter
30+
run: |
31+
python3 -m flake8 .
1532
ubuntu-gcc-build:
33+
needs:
34+
- clang-format
35+
- python-lint
1636
runs-on: ubuntu-latest
1737
steps:
1838
- uses: actions/checkout@v4
@@ -113,6 +133,9 @@ jobs:
113133
env:
114134
OMP_NUM_THREADS: 16
115135
ubuntu-clang-build:
136+
needs:
137+
- clang-format
138+
- python-lint
116139
runs-on: ubuntu-latest
117140
steps:
118141
- uses: actions/checkout@v4
@@ -213,6 +236,8 @@ jobs:
213236
env:
214237
OMP_NUM_THREADS: 16
215238
ubuntu-clang-sanitizer-build:
239+
needs:
240+
- ubuntu-clang-build
216241
runs-on: ubuntu-latest
217242
steps:
218243
- uses: actions/checkout@v4
@@ -316,6 +341,9 @@ jobs:
316341
OMP_NUM_THREADS: 16
317342
ASAN_RUN: 1
318343
macos-clang-build:
344+
needs:
345+
- clang-format
346+
- python-lint
319347
runs-on: macOS-latest
320348
steps:
321349
- uses: actions/checkout@v4
@@ -408,6 +436,9 @@ jobs:
408436
env:
409437
OMP_NUM_THREADS: 16
410438
windows-msvc-build:
439+
needs:
440+
- clang-format
441+
- python-lint
411442
runs-on: windows-latest
412443
defaults:
413444
run:
@@ -490,6 +521,9 @@ jobs:
490521
env:
491522
OMP_NUM_THREADS: 16
492523
windows-clang-build:
524+
needs:
525+
- clang-format
526+
- python-lint
493527
runs-on: windows-latest
494528
defaults:
495529
run:
@@ -576,6 +610,8 @@ jobs:
576610
OMP_NUM_THREADS: 16
577611
CLANG_BUILD: 1
578612
ubuntu-gcc-build-codecov:
613+
needs:
614+
- ubuntu-gcc-build
579615
runs-on: ubuntu-latest
580616
steps:
581617
- uses: actions/checkout@v4
@@ -675,3 +711,61 @@ jobs:
675711
with:
676712
name: cov-report
677713
path: 'cov-report'
714+
ubuntu-gcc-build-perf-stats:
715+
needs:
716+
- macos-clang-build
717+
- ubuntu-clang-sanitizer-build
718+
- ubuntu-gcc-build-codecov
719+
- windows-clang-build
720+
- windows-msvc-build
721+
runs-on: ubuntu-latest
722+
steps:
723+
- uses: actions/checkout@v4
724+
with:
725+
submodules: recursive
726+
- name: Setup environment
727+
run: |
728+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
729+
sudo apt-get update
730+
sudo apt-get install gcc-12 g++-12
731+
sudo apt-get install ninja-build
732+
sudo apt-get install mpich libmpich* mpi* openmpi-bin
733+
sudo apt-get install libomp-dev
734+
sudo apt-get install valgrind
735+
python3 -m pip install xlsxwriter
736+
- name: ccache
737+
uses: hendrikmuhs/[email protected]
738+
with:
739+
key: ${{ github.job }}
740+
create-symlink: true
741+
- name: CMake configure
742+
run: >
743+
cmake -S . -B build
744+
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
745+
-G Ninja -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON
746+
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
747+
-D CMAKE_BUILD_TYPE=RELEASE
748+
env:
749+
CC: gcc-12
750+
CXX: g++-12
751+
- name: Ninja build
752+
run: |
753+
cmake --build build
754+
env:
755+
CC: gcc-12
756+
CXX: g++-12
757+
- name: Run perf count checker
758+
run: |
759+
source scripts/run_perf_count_checker.sh
760+
- name: Run perf tests
761+
run: |
762+
source scripts/generate_perf_results.sh
763+
- name: Archive results
764+
uses: montudor/action-zip@v1
765+
with:
766+
args: zip -qq -r perf-stat.zip build/perf_stat_dir
767+
- name: Upload results
768+
uses: actions/[email protected]
769+
with:
770+
name: perf-stat
771+
path: perf-stat.zip

Diff for: .github/workflows/perf-statistic.yml

-62
This file was deleted.

Diff for: .github/workflows/static-analysis-pr.yml

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
- if: steps.review.outputs.total_comments > 0
3535
run: exit 1
3636
clang-tidy-for-gcc-build:
37+
needs:
38+
- clang-tidy
3739
runs-on: ubuntu-latest
3840
steps:
3941
- uses: actions/checkout@v4

Diff for: .github/workflows/static-analysis.yml

-26
This file was deleted.

0 commit comments

Comments
 (0)