File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : CTest
1+ name : Test and Lint
22
33on :
44 push :
77 branches : ["main", "dev"]
88
99jobs :
10- build-and-test :
10+ build :
1111 runs-on : ubuntu-latest
1212
1313 steps :
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/).*'
You can’t perform that action at this time.
0 commit comments