From 663b5916412702a6e7591ac24fba2dff57e082bc Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Sat, 31 Jul 2021 18:56:18 +0200 Subject: [PATCH] CI: structure for running WLCS tests --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++-- compile_wlcs.sh | 13 +++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100755 compile_wlcs.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1117f7..43e49a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -251,6 +251,19 @@ jobs: - smithay-tests - anvil-tests + strategy: + fail-fast: false + matrix: + include: + - job_name: "Core tests" + gtest_filter: "SelfTest*:FrameSubmission*" + - job_name: "Output tests" + gtest_filter: "XdgOutputV1Test*" + - job_name: "Pointer input tests" + gtest_filter: "*/SurfacePointerMotionTest*" + + name: "WLCS: ${{ matrix.job_name }}" + env: RUSTFLAGS: "-D warnings" @@ -277,7 +290,7 @@ jobs: profile: minimal - name: System dependencies - run: sudo apt-get update; sudo apt-get install libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libsystemd-dev libdbus-1-dev + run: sudo apt-get update; sudo apt-get install cmake libgtest-dev google-mock libboost-dev libxkbcommon-dev libwayland-dev - name: Build cache uses: actions/cache@v2 @@ -285,10 +298,22 @@ jobs: path: target key: ${{ runner.os }}-build-rust_stable-wlcs-${{ hashFiles('**/Cargo.toml') }} - - name: Build WLCS plugin + - name: WLCS build cache + uses: actions/cache@v2 + with: + path: wlcs + key: ${{ runner.os }}-build-wlcs-${{ hashFiles('./compile_wlcs.sh') }} + + - name: Build WLCS + run: ./compile_wlcs.sh + + - name: Build anvil WLCS plugin uses: actions-rs/cargo@v1 env: RUST_BACKTRACE: full with: command: build args: --manifest-path "./wlcs_anvil/Cargo.toml" + + - name: Run test suite + run: ./wlcs/wlcs ./target/debug/libwlcs_anvil.so --gtest_filter="${{ matrix.gtest_filter }}" diff --git a/compile_wlcs.sh b/compile_wlcs.sh new file mode 100755 index 0000000..16cce61 --- /dev/null +++ b/compile_wlcs.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ -f "./wlcs/wlcs" ]; then + echo "Using cached WLCS." +else + echo "Compiling WLCS." + git clone https://github.com/MirServer/wlcs.git + cd wlcs + # checkout a specific revision + git reset --hard dcacf09b60f1c5caf103a58046c547df6bb0b85b + cmake -DWLCS_BUILD_ASAN=False -DWLCS_BUILD_TSAN=False -DWLCS_BUILD_UBSAN=False . + make +fi