run tests on PR #13
Workflow file for this run
This file contains hidden or 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: CMake on a single platform | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| tests: | |
| # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
| # You can convert this to a matrix build if you need cross-platform coverage. | |
| # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Cache ccache | |
| id: cache-ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: $HOME/.cache | |
| key: ccache | |
| restore-keys: | | |
| $HOME/.cache/ccache | |
| - if: ${{ steps.cache-ccache.outputs.cache-hit == 'true' }} | |
| name: Report on cache | |
| continue-on-error: true | |
| run: echo "cache hit" | |
| - name: Deps | |
| run: | | |
| sudo apt-get install libgl1-mesa-dev build-essential git make \ | |
| pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \ | |
| libaudio-dev libfribidi-dev libjack-dev libsndio-dev libx11-dev libxext-dev \ | |
| libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \ | |
| libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \ | |
| libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev libthai-dev \ | |
| libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev ccache | |
| - name: Configure CMake | |
| # Configure CMake in a 'build' subdirectory. | |
| run: cmake --preset debug -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| - name: Build | |
| # Build your program with the given configuration | |
| run: cmake --build --preset tests-debug | |
| - name: Test | |
| working-directory: ${{github.workspace}}/build/debug | |
| # Execute tests | |
| run: ./tests | |