-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (77 loc) · 2.56 KB
/
test.yaml
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
77
78
79
name: Tests
on:
push:
branches:
- main
pull_request:
jobs:
python:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
# TODO: Figure out why EGL isn't working on ubuntu
# os: [ubuntu-latest, windows-latest]
python-version: ["3.11", "3.12"]
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Set up MSVC
uses: ilammy/[email protected]
- name: Set up CMake
uses: lukka/[email protected]
- name: Install EGL on Linux for headless Arcade
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install libegl1
- name: Run Tox
run: |
pip install tox tox-gh-actions
tox
- name: Upload coverage report
uses: coverallsapp/[email protected]
with:
file: coverage.lcov
flag-name: run-python-${{ matrix.os }}-${{ matrix.python-version }}
parallel: true
cpp:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Set up MSVC
uses: ilammy/[email protected]
- name: Set up CMake
uses: lukka/[email protected]
- name: Build CMake and run CTest
working-directory: ${{ github.workspace }}/src/hades_extensions
run: |
cmake -DDO_PYTHON=OFF --preset Debug
cmake --build build-debug
ctest --output-on-failure --no-tests=error --test-dir ${{ github.workspace }}/src/hades_extensions/build-debug/tests
- name: Generate the coverage report
if: matrix.os == 'ubuntu-latest'
run: |
pip install gcovr
gcovr -r ${{ github.workspace }} --exclude src/hades_extensions/build-debug --exclude src/hades_extensions/tests --exclude src/hades_extensions/src/binding.cpp --coveralls coverage.json
- name: Upload coverage report
if: matrix.os == 'ubuntu-latest'
uses: coverallsapp/[email protected]
with:
file: coverage.json
flag-name: run-cpp-${{ matrix.os }}
parallel: true
finish:
runs-on: ubuntu-latest
needs: [python, cpp]
steps:
- name: Upload coverage report
uses: coverallsapp/[email protected]
with:
parallel-finished: true