Bump the github-dependencies group with 2 updates #1072
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
python: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.11", "3.12"] | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
with: | |
submodules: recursive | |
- 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 Mesa on Windows for headless Arcade | |
if: matrix.os == 'windows-latest' | |
uses: ssciwr/setup-mesa-dist-win@v2 | |
- name: Run Nox | |
run: | | |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then | |
sudo apt-get update && sudo apt-get install libegl1 | |
export ARCADE_HEADLESS=1 | |
fi | |
pipx run nox --error-on-missing-interpreters --stop-on-first-error -s tests-${{ matrix.python-version }} | |
- 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] | |
include: | |
- os: windows-latest | |
cmake-preset: WinDebug | |
- os: ubuntu-latest | |
cmake-preset: LinuxDebug | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
with: | |
submodules: recursive | |
- 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 ${{ matrix.cmake-preset }} | |
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 |