fix: prepare display for test-for-ubuntu workflow #19
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: Test for Ubuntu | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
strategy: | |
matrix: | |
c_compiler: [gcc, clang] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: > | |
sudo apt-get update && | |
sudo apt-get install -y libgtk-4-dev xvfb | |
- name: Start Xvfb | |
run: Xvfb :99 -screen 0 1024x768x24 & | |
- name: Set display | |
run: echo "DISPLAY=:99" >> $GITHUB_ENV | |
- name: Configure CMake | |
run: cmake -DCMAKE_C_COMPILER=${{matrix.c_compiler}} -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Run | |
run: ./build/smaster4s-timer |