-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (76 loc) · 2.55 KB
/
unit-test-ubuntu.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: unit-test-ubuntu
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-ubuntu:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup python environment
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Configure build
run: cd build && cmake --preset ubuntu ../
- name: Execute build
run: cd build && cmake --build . -j
- name: Cache build artifacts
uses: actions/cache@v4
with:
path: build
key: ${{ github.workflow }}-${{ github.sha }}
test-ubuntu:
runs-on: ubuntu-24.04
needs: build-ubuntu
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Retrieve build artifacts
uses: actions/cache@v4
with:
path: build
key: ${{ github.workflow }}-${{ github.sha }}
- name: Setup python environment
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install python packages
run: pip install -r requirements.txt
- name: Install dependencies
run: sudo apt install libegl1 # Fix for PySide6
- name: Run unit test
run: ./hpr-sim.py -i input/unit_test.yml -o output/ && ls -l output/*/*
- name: Run regression test
run: python tools/regression_test.py tools/unit_test/ubuntu output/unit_test output/diff
pyinstaller-ubuntu:
runs-on: ubuntu-24.04
needs: build-ubuntu
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Retrieve build artifacts
uses: actions/cache@v4
with:
path: build
key: ${{ github.workflow }}-${{ github.sha }}
- name: Setup python environment
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install python packages
run: pip install -r requirements.txt
- name: Install dependencies
run: sudo apt install libegl1 # Fix for PySide6
- name: PyInstaller build
run: python tools/pyinstaller_build.py
- name: Run unit test
run: cd build/pyinstaller/dist/hpr-sim && ./hpr-sim -i input/unit_test.yml -o output/ && ls -l output/*/*
- name: Run regression test
run: python tools/regression_test.py tools/unit_test/ubuntu build/pyinstaller/dist/hpr-sim/output/unit_test build/pyinstaller/dist/hpr-sim/output/diff