Try something else for less xvfb sketchiness #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit tests | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
main: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
DISPLAY: ":99" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- uses: abatilo/actions-poetry@v2 | |
- name: Configure runner (Linux) | |
if: runner.os == 'Linux' | |
run: sudo apt-get install clang ninja-build | |
- name: Configure runner (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 $DISPLAY -screen 0 1920x1080x24 -ac +extension GLX & | |
sleep 5 | |
fluxbox > /dev/null 2>&1 & | |
sleep 5 | |
- name: Test | |
run: ./bin/tests | |
env: | |
ESPEAK_DATA_PATH: ./vendor/src/espeak-ng/espeak-ng-data |