Skip to content

Commit dd00b2b

Browse files
committed
Added lint step to the gh actinos and sperated build-and-test into build and test.
1 parent 1978277 commit dd00b2b

1 file changed

Lines changed: 38 additions & 4 deletions

File tree

.github/workflows/testing.yml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CTest
1+
name: Test and Lint
22

33
on:
44
push:
@@ -7,7 +7,7 @@ on:
77
branches: ["main", "dev"]
88

99
jobs:
10-
build-and-test:
10+
build:
1111
runs-on: ubuntu-latest
1212

1313
steps:
@@ -23,5 +23,39 @@ jobs:
2323
- name: Build
2424
run: cmake --build build
2525

26-
- name: Run tests
27-
run: ctest --test-dir build --output-on-failure
26+
- uses: actions/upload-artifact@v4
27+
with:
28+
name: built
29+
path: ./build
30+
31+
32+
test:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- uses: actions/download-artifact@v4
38+
with:
39+
name: built
40+
path: ./build
41+
- name: run-tests
42+
run: ctest --test-dir build --output-on-failure
43+
44+
lint:
45+
needs: build
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v3
51+
52+
- uses: actions/download-artifact@v4
53+
with:
54+
name: built
55+
path: ./build
56+
57+
- name: Get clang-tidy
58+
run: sudo apt-get update && sudo apt-get install -y cmake clang clang-tidy g++
59+
60+
- name: lint
61+
run: ./run-clang-tidy.py -p build -source-filter '^(?!.*_deps/googletest-src/).*'

0 commit comments

Comments
 (0)