-
Notifications
You must be signed in to change notification settings - Fork 576
47 lines (39 loc) · 1.15 KB
/
Copy pathunittest.yml
File metadata and controls
47 lines (39 loc) · 1.15 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
name: UnitTest
on:
- push
- pull_request
- workflow_call
jobs:
test:
name: Test on ${{ matrix.os }}, ${{ matrix.install_from }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] #, windows-latest, macos-latest]
install_from: [make, cmake]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Cache files
uses: actions/cache@v3
with:
path: |
example-data/
key: ${{ runner.os }}-20231096
- name: Install dependency
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install --yes libeigen3-dev libjpeg-dev
# Didn't test pybind11. Seems to be old and incompatible with the python version.
- name: Build with make
if: matrix.install_from == 'make'
run: |
make -j -C src
- name: Build with cmake
if: matrix.install_from == 'cmake'
run: |
cmake -B build && make -j -C build
cp build/src/image-stitching ./src/
- name: Run Unittests
run: cd src && python run_test.py