File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Unit Tests
2+
3+ on :
4+ push :
5+ branches :
6+ - feature/unitTests
7+
8+ concurrency :
9+ group : unit-tests-${{ github.ref }}
10+ cancel-in-progress : true
11+
12+ jobs :
13+ build-and-test :
14+ name : Build & Test (Ubuntu)
15+ runs-on : ubuntu-latest
16+ env :
17+ CTEST_OUTPUT_ON_FAILURE : 1
18+ CCACHE_DIR : ${{ github.workspace }}/.ccache
19+ steps :
20+ - name : Checkout
21+ uses : actions/checkout@v4
22+
23+ - name : Install dependencies
24+ run : |
25+ sudo apt-get update
26+ sudo apt-get install -y --no-install-recommends \
27+ ninja-build build-essential cmake \
28+ libboost-all-dev libspdlog-dev libtinyxml2-dev libconfig++-dev \
29+ libssl-dev libnl-3-dev zlib1g-dev ccache clang-tidy clang g++-12
30+
31+ - name : Configure (CMake)
32+ run : |
33+ cmake -S . -B build -GNinja -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release
34+
35+ - name : Build
36+ run : cmake --build build --parallel
37+
38+ - name : List tests (debug)
39+ run : ctest --test-dir build/tests -N
40+
41+ - name : Run unit tests
42+ run : |
43+ set -o pipefail
44+ ctest --test-dir build/tests --output-on-failure -j 2 | tee build/ctest-log.txt
45+
46+ - name : Upload test log
47+ if : always()
48+ uses : actions/upload-artifact@v4
49+ with :
50+ name : ctest-log
51+ path : build/ctest-log.txt
52+ if-no-files-found : warn
You can’t perform that action at this time.
0 commit comments