|
5 | 5 | push: |
6 | 6 | branches: [main] |
7 | 7 | jobs: |
8 | | - build: |
9 | | - name: Build |
| 8 | + build-release: |
| 9 | + name: Build Release |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | steps: |
12 | | - - name: Checkout repository |
| 12 | + - name: Checkout |
13 | 13 | |
14 | 14 |
|
15 | | - - name: Configure and build this project |
| 15 | + - name: Configure project |
16 | 16 | |
17 | | - with: |
18 | | - run-build: true |
19 | 17 |
|
20 | | - unit-tests: |
21 | | - name: Unit Tests |
22 | | - runs-on: ubuntu-latest |
23 | | - steps: |
24 | | - - name: Checkout repository |
25 | | - |
| 18 | + - name: Build project |
| 19 | + run: cmake --build build |
26 | 20 |
|
27 | | - - name: Configure, build, and test this project |
28 | | - |
29 | | - with: |
30 | | - args: -DBUILD_TESTING=ON |
31 | | - run-test: true |
32 | | - |
33 | | - - name: Check code coverage |
34 | | - |
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 |
41 | 23 | runs-on: ubuntu-latest |
42 | 24 | steps: |
43 | | - - name: Checkout repository |
| 25 | + - name: Checkout |
44 | 26 | |
45 | 27 |
|
46 | 28 | - name: Install cmake-format |
47 | 29 | run: pip3 install cmake-format |
48 | 30 |
|
49 | | - - name: Configure CMake |
50 | | - run: cmake . -B build |
| 31 | + - name: Configure project |
| 32 | + |
| 33 | + with: |
| 34 | + options: BUILD_TESTING=ON |
51 | 35 |
|
52 | | - - name: Check code formatting |
| 36 | + - name: Check formatting |
53 | 37 | run: | |
54 | 38 | 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 | + |
| 49 | + with: |
| 50 | + excludes: build/* |
| 51 | + fail-under-line: 80 |
0 commit comments