CI: structure for running WLCS tests

This commit is contained in:
Victor Berger 2021-07-31 18:56:18 +02:00 committed by Victor Berger
parent 01ac0f135b
commit 663b591641
2 changed files with 40 additions and 2 deletions

View File

@ -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 }}"

13
compile_wlcs.sh Executable file
View File

@ -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