Merge pull request #43 from mathisloge/dependabot/github_actions/acti… #339
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: Build and test | |
on: | |
push: | |
branches: ["main", "develop"] | |
pull_request: | |
branches: ["main", "develop"] | |
permissions: | |
contents: read # access to check out code and install dependencies | |
jobs: | |
format-source-code: | |
name: Format source code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: actions/setup-python@v5 | |
- uses: pre-commit/[email protected] | |
- uses: pre-commit-ci/[email protected] | |
if: always() | |
build_matrix: | |
strategy: | |
matrix: | |
os: [ubuntu-24.04] | |
runs-on: ${{ matrix.os }} | |
name: Build & Test | |
needs: format-source-code | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: lukka/get-cmake@latest | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ninja-build doxygen libunwind-dev libgrpc++-dev protobuf-compiler-grpc weston ccache | |
version: 1.0 | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ matrix.os }} | |
create-symlink: true | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
cache: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
cache: 'pip' # caching pip dependencies | |
- run: pip install -r requirements-dev.txt | |
- name: Start Weston | |
run: | | |
weston --no-config --socket=wl-test-env --backend=headless --idle-time=0 > weston.log 2>&1 & | |
# Wait for the Wayland socket to become available (timeout after 10s) | |
for i in {1..100}; do | |
if [ -e /run/user/$(id -u)/wayland-0 ] || [ -e /tmp/wayland-wl-test-env ]; then | |
break | |
fi | |
sleep 0.1 | |
done | |
- name: Run CMake workflow | |
run: cmake --workflow ci |