-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (28 loc) · 1.02 KB
/
push_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Push CI
on:
push:
branches:
- 'feature/*'
jobs:
build:
name: Build & Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4 # to use node20 instead of node12 and node 16 which are deprecated
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2 # Use the latest major version for stability
with:
cmake-version: '3.26.3'
- name: Install dependencies
run: sudo apt-get install -y libgtest-dev libgmock-dev libboost-all-dev libeigen3-dev
- name: Configure CMake
run: |
cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_STANDARD=20 ..
- name: Build Main Executable and Test Executable
run: | # probably need to build specific target --target Option_pricer Unit_tests to exclude examples
cmake --build build --target Unit_tests
- name: Run Unit Tests
run: |
cd build
ctest -R UnitTests --output-on-failure