Skip to content

Commit 0fc19ef

Browse files
committed
[CI] Split CI into stages
1 parent ffe4589 commit 0fc19ef

File tree

3 files changed

+90
-88
lines changed

3 files changed

+90
-88
lines changed

.github/workflows/main.yml

Lines changed: 90 additions & 0 deletions
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,57 @@ jobs:
675711
with:
676712
name: cov-report
677713
path: 'cov-report'
714+
ubuntu-gcc-build-perf-stats:
715+
needs:
716+
- ubuntu-gcc-build-codecov
717+
runs-on: ubuntu-latest
718+
steps:
719+
- uses: actions/checkout@v4
720+
with:
721+
submodules: recursive
722+
- name: Setup environment
723+
run: |
724+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
725+
sudo apt-get update
726+
sudo apt-get install gcc-12 g++-12
727+
sudo apt-get install ninja-build
728+
sudo apt-get install mpich libmpich* mpi* openmpi-bin
729+
sudo apt-get install libomp-dev
730+
sudo apt-get install valgrind
731+
python3 -m pip install xlsxwriter
732+
- name: ccache
733+
uses: hendrikmuhs/[email protected]
734+
with:
735+
key: ${{ github.job }}
736+
create-symlink: true
737+
- name: CMake configure
738+
run: >
739+
cmake -S . -B build
740+
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
741+
-G Ninja -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON
742+
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
743+
-D CMAKE_BUILD_TYPE=RELEASE
744+
env:
745+
CC: gcc-12
746+
CXX: g++-12
747+
- name: Ninja build
748+
run: |
749+
cmake --build build
750+
env:
751+
CC: gcc-12
752+
CXX: g++-12
753+
- name: Run perf count checker
754+
run: |
755+
source scripts/run_perf_count_checker.sh
756+
- name: Run perf tests
757+
run: |
758+
source scripts/generate_perf_results.sh
759+
- name: Archive results
760+
uses: montudor/action-zip@v1
761+
with:
762+
args: zip -qq -r perf-stat.zip build/perf_stat_dir
763+
- name: Upload results
764+
uses: actions/[email protected]
765+
with:
766+
name: perf-stat
767+
path: perf-stat.zip

.github/workflows/perf-statistic.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/static-analysis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)