Skip to content

Commit e46d00a

Browse files
authored
refactor ci workflows (#161)
* rename workflows * update ci-toolchain matrix * ci-main use RelWithDebInfo * remove useless config * split static-check into two jobs
1 parent d446f93 commit e46d00a

7 files changed

Lines changed: 33 additions & 25 deletions

File tree

.github/workflows/build-and-test-latest-kernel.yml renamed to .github/workflows/ci-latest-kernel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
-DTESTS_STATIC_LINK=ON
7979
8080
- name: Build
81-
run: cmake --build ${{github.workspace}}/build --config Release -j$(nproc)
81+
run: cmake --build ${{github.workspace}}/build -j$(nproc)
8282

8383
- name: Run Tests on QEMU
8484
timeout-minutes: 15
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
compiler:
2727
- { cc: clang, cxx: clang++ }
2828
- { cc: gcc, cxx: g++ }
29-
build-type: [ Debug, Release ]
3029
sanitizer: [ tsan, asan ]
3130

3231
steps:
@@ -69,19 +68,17 @@ jobs:
6968
$SANITIZER_FLAG \
7069
-DCMAKE_C_COMPILER=${{matrix.compiler.cc}} \
7170
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} \
72-
-DCMAKE_BUILD_TYPE=${{matrix.build-type}}
71+
-DCMAKE_BUILD_TYPE=RelWithDebInfo
7372
7473
- name: Build
75-
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build-type}}
76-
-j$(nproc)
74+
run: cmake --build ${{github.workspace}}/build -j$(nproc)
7775

7876
- name: Run Tests
7977
timeout-minutes: 5
8078
working-directory: ${{github.workspace}}/build
81-
run: ctest --verbose -C ${{matrix.build-type}}
79+
run: ctest --verbose
8280

8381
- name: Run Benchmarks
8482
timeout-minutes: 5
85-
if: matrix.build-type == 'Release'
8683
working-directory: ${{github.workspace}}
8784
run: bash scripts/run-bench.sh -t 60 build/benchmarks
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@ on:
1313
- "**.md"
1414

1515
jobs:
16-
static-check:
16+
formatting:
17+
runs-on: ubuntu-26.04
18+
timeout-minutes: 2
19+
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v4
23+
24+
- name: Formatting Check
25+
run: bash ./scripts/format-all.sh
26+
27+
static-analysis:
1728
runs-on: ubuntu-26.04
1829
timeout-minutes: 10
1930

@@ -23,10 +34,6 @@ jobs:
2334
with:
2435
submodules: true
2536

26-
- name: Formatting Check
27-
run: |
28-
bash ./scripts/format-all.sh
29-
3037
- name: Configure liburing
3138
run: |
3239
cd third_party/liburing
@@ -44,5 +51,4 @@ jobs:
4451
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
4552
4653
- name: Static Analysis
47-
run: |
48-
bash ./scripts/check-all.sh
54+
run: bash ./scripts/check-all.sh

.github/workflows/build-and-test-liburing-versions.yml renamed to .github/workflows/ci-toolchain.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI (Versions)
1+
name: CI (Toolchain)
22

33
on:
44
push:
@@ -21,6 +21,10 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
liburing-version: [ "2.3", "2.14" ]
24+
compiler:
25+
- { cc: gcc, cxx: g++ }
26+
- { cc: clang, cxx: clang++ }
27+
generator: [ "Ninja", "Unix Makefiles" ]
2428

2529
steps:
2630
- name: Checkout Repository and Submodules
@@ -38,17 +42,18 @@ jobs:
3842
- name: Configure CMake
3943
run: |
4044
cmake -B ${{github.workspace}}/build \
45+
-G "${{ matrix.generator }}" \
4146
-DBUILD_EXAMPLES=ON \
4247
-DBUILD_BENCHMARKS=ON \
4348
-DBUILD_TESTS=ON \
44-
-DCMAKE_C_COMPILER=clang \
45-
-DCMAKE_CXX_COMPILER=clang++ \
49+
-DCMAKE_C_COMPILER=${{ matrix.compiler.cc }} \
50+
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} \
4651
-DCMAKE_BUILD_TYPE=Debug
4752
4853
- name: Build
49-
run: cmake --build ${{github.workspace}}/build --config Debug -j$(nproc)
54+
run: cmake --build ${{github.workspace}}/build -j$(nproc)
5055

5156
- name: Run Tests
5257
timeout-minutes: 5
5358
working-directory: ${{github.workspace}}/build
54-
run: ctest --verbose -C Debug
59+
run: ctest --verbose

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
![Release](https://img.shields.io/github/v/release/wokron/condy)
66
![Stars](https://img.shields.io/github/stars/wokron/condy?style=social)
77

8-
![CI (Main)](https://github.com/wokron/condy/actions/workflows/build-and-test.yml/badge.svg?branch=master)
9-
![CI (Latest Kernel)](https://github.com/wokron/condy/actions/workflows/build-and-test-latest-kernel.yml/badge.svg?branch=master)
10-
![CI (Versions)](https://github.com/wokron/condy/actions/workflows/build-and-test-liburing-versions.yml/badge.svg?branch=master)
11-
![CI (Static Check)](https://github.com/wokron/condy/actions/workflows/static-check.yml/badge.svg?branch=master)
12-
![Deploy Docs](https://github.com/wokron/condy/actions/workflows/deploy-gh-pages.yaml/badge.svg?branch=master)
8+
![CI (Main)](https://github.com/wokron/condy/actions/workflows/ci-main.yml/badge.svg?branch=master)
9+
![CI (Latest Kernel)](https://github.com/wokron/condy/actions/workflows/ci-latest-kernel.yml/badge.svg?branch=master)
10+
![CI (Toolchain)](https://github.com/wokron/condy/actions/workflows/ci-toolchain.yml/badge.svg?branch=master)
11+
![CI (Static Check)](https://github.com/wokron/condy/actions/workflows/ci-static-check.yml/badge.svg?branch=master)
12+
![Deploy Docs](https://github.com/wokron/condy/actions/workflows/deploy-docs.yml/badge.svg?branch=master)
1313

1414
***C++ Asynchronous System Call Layer for Linux, Powered by io_uring and C++20 Coroutines***
1515

‎docs/build.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ cmake -B build -S . \
5151
-DBUILD_BENCHMARKS=ON \
5252
-DBUILD_TESTS=ON \
5353
-DCMAKE_BUILD_TYPE=Release
54-
cmake --build build --config Release -j$(nproc)
54+
cmake --build build -j$(nproc)
5555
```
5656

5757
After building:

0 commit comments

Comments
 (0)