Skip to content

Commit cb1be5b

Browse files
authored
ci: organize jobs in the CI workflow (#50)
* ci: rename Build job into Build Release job * ci: organize steps in the Build Release job * ci: organize steps in the Unit Tests job * ci: merge testing jobs into Build Testing job
1 parent 1102347 commit cb1be5b

File tree

1 file changed

+27
-31
lines changed

1 file changed

+27
-31
lines changed

.github/workflows/ci.yaml

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,47 @@ on:
55
push:
66
branches: [main]
77
jobs:
8-
build:
9-
name: Build
8+
build-release:
9+
name: Build Release
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout repository
12+
- name: Checkout
1313
uses: actions/[email protected]
1414

15-
- name: Configure and build this project
15+
- name: Configure project
1616
uses: threeal/[email protected]
17-
with:
18-
run-build: true
1917

20-
unit-tests:
21-
name: Unit Tests
22-
runs-on: ubuntu-latest
23-
steps:
24-
- name: Checkout repository
25-
uses: actions/[email protected]
18+
- name: Build project
19+
run: cmake --build build
2620

27-
- name: Configure, build, and test this project
28-
uses: threeal/[email protected]
29-
with:
30-
args: -DBUILD_TESTING=ON
31-
run-test: true
32-
33-
- name: Check code coverage
34-
uses: threeal/[email protected]
35-
with:
36-
excludes: build/*
37-
fail-under-line: 80
38-
39-
check-formatting:
40-
name: Check Formatting
21+
build-testing:
22+
name: Build Testing
4123
runs-on: ubuntu-latest
4224
steps:
43-
- name: Checkout repository
25+
- name: Checkout
4426
uses: actions/[email protected]
4527

4628
- name: Install cmake-format
4729
run: pip3 install cmake-format
4830

49-
- name: Configure CMake
50-
run: cmake . -B build
31+
- name: Configure project
32+
uses: threeal/[email protected]
33+
with:
34+
options: BUILD_TESTING=ON
5135

52-
- name: Check code formatting
36+
- name: Check formatting
5337
run: |
5438
cmake --build build --target format
55-
cmake --build build --target check-format
39+
git diff --exit-code HEAD
40+
41+
- name: Build Project
42+
run: cmake --build build
43+
44+
- name: Test Project
45+
run: ctest --test-dir build --output-on-failure --no-tests=error
46+
47+
- name: Check coverage
48+
uses: threeal/[email protected]
49+
with:
50+
excludes: build/*
51+
fail-under-line: 80

0 commit comments

Comments
 (0)