-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 1.59 KB
/
unit-tests.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
name: Unit tests
on:
push:
branches:
- main
jobs:
main:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- uses: abatilo/actions-poetry@v2
- name: Install build system (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install clang ninja-build
- name: Install build system (Windows)
uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
- name: Install Conan
run: |
poetry install
poetry run conan version
- name: Restore Conan cache
uses: actions/cache@v4
with:
path: ~/.conan2
key: ${{ runner.os }}-${{ hashFiles('**/conan.lock') }}
- name: Install package dependencies
run: poetry run conan install . --profile:all=./.conan2/profiles/${{ runner.os }} --output-folder=build --build=missing --lockfile-partial
- name: Configure
run: cmake --preset conan-release
- name: Build
run: cmake --build --preset conan-release
- name: Xvfb (Linux)
if: runner.os == 'Linux'
run: Xvfb :1 -screen 0 1600x1200x24 &
- name: Test (Linux)
if: runner.os == 'Linux'
run: LD_LIBRARY_PATH=vendor/lib:${LD_LIBRARY_PATH} DISPLAY=:1 ./bin/tests
- name: Test (Windows)
if: runner.os == 'Windows'
run: ./bin/tests
env:
ESPEAK_DATA_PATH: ./vendor/src/espeak-ng/espeak-ng-data