-
Notifications
You must be signed in to change notification settings - Fork 84
57 lines (49 loc) · 1.67 KB
/
Copy pathunit_tests.yml
File metadata and controls
57 lines (49 loc) · 1.67 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Unit Tests
on:
push:
branches: [ phoenix, main ]
paths:
- 'Controller/main/InverseKinematics.cpp'
- 'Controller/main/AxisScaling.cpp'
- 'Controller/main/MotionCueing.cpp'
- 'Controller/include/**'
- 'stewart-core' # shared submodule gitlink — the math under test lives here now
- 'tests/**'
- '.github/workflows/unit_tests.yml'
pull_request:
branches: [ phoenix, main ]
paths:
- 'Controller/main/InverseKinematics.cpp'
- 'Controller/main/AxisScaling.cpp'
- 'Controller/main/MotionCueing.cpp'
- 'Controller/include/**'
- 'stewart-core' # shared submodule gitlink — the math under test lives here now
- 'tests/**'
- '.github/workflows/unit_tests.yml'
jobs:
unit-tests:
name: C Math Module Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive' # stewart-core supplies the math sources under test
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential
- name: Configure CMake
run: cmake -S tests -B tests/build -DCMAKE_BUILD_TYPE=Release
- name: Build tests
run: cmake --build tests/build --config Release
- name: Run tests (Linux)
if: runner.os == 'Linux'
run: ./tests/build/stewart-tests
- name: Run tests (Windows)
if: runner.os == 'Windows'
run: .\tests\build\Release\stewart-tests.exe