File tree 2 files changed +38
-7
lines changed
2 files changed +38
-7
lines changed Original file line number Diff line number Diff line change 1
- name : CI/CD
1
+ name : Pull Request CI
2
2
3
3
on : # On what action this workflow will be triggered
4
- push :
5
- branches :
6
- - feature/*
7
- - fix/*
8
- - release/*
9
4
pull_request :
10
5
branches :
11
6
- main
12
7
- dev
13
8
14
9
jobs :
15
10
build :
16
- name : Build and Test # Give the build job an appropriate name
11
+ name : Build & Run All Tests # Give the build job an appropriate name
17
12
runs-on : ubuntu-latest
18
13
19
14
steps :
Original file line number Diff line number Diff line change
1
+ name : Push CI
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' feature/*'
7
+
8
+ jobs :
9
+ build :
10
+ name : Build & Run All Tests
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : Checkout code
15
+ uses : actions/checkout@v4 # to use node20 instead of node12 and node 16 which are deprecated
16
+
17
+ - name : Set up CMake
18
+ uses : jwlawson/actions-setup-cmake@v2 # Use the latest major version for stability
19
+ with :
20
+ cmake-version : ' 3.26.3'
21
+
22
+ - name : Install dependencies
23
+ run : sudo apt-get install -y libgtest-dev libgmock-dev clang-tidy lcov # clang-format
24
+
25
+ - name : Configure CMake
26
+ run : |
27
+ cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_STANDARD=20 ..
28
+
29
+ - name : Build Main Executable and Test Executable
30
+ run : |
31
+ cmake --build build
32
+
33
+ - name : Run Unit Tests
34
+ run : |
35
+ cd build
36
+ ctest -R UnitTests--output-on-failure
You can’t perform that action at this time.
0 commit comments