name: Continuous Integration on: push: branches: - master pull_request: workflow_dispatch: jobs: format: runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 - name: Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable override: true profile: minimal components: rustfmt default: true - name: Cargo cache uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }} - name: Format uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check clippy-check: runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 - name: Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable override: true profile: minimal components: clippy default: true - name: Cargo cache uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }} - name: Build cache uses: actions/cache@v2 with: path: target key: ${{ runner.os }}-build-rust_stable-check-${{ hashFiles('**/Cargo.toml') }} - 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 - name: Clippy Smithay uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} args: --features "test_all_features" -- -D warnings -A clippy::non-send-fields-in-send-ty - name: Clippy Anvil uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} args: --manifest-path "./anvil/Cargo.toml" --features "test_all_features" -- -D warnings -A clippy::non-send-fields-in-send-ty check-minimal: env: RUSTFLAGS: "-D warnings" runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 - name: Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: nightly override: true profile: minimal default: true - name: Cargo cache uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git key: ${{ runner.os }}-cargo-rust_nightly-${{ hashFiles('**/Cargo.toml') }} - 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 - name: Downgrade to minimal dependencies uses: actions-rs/cargo@v1 with: command: update args: -Z minimal-versions - name: Update exceptions uses: actions-rs/cargo@v1 with: command: update args: -p libdbus-sys - name: Check uses: actions-rs/cargo@v1 with: command: check args: --features "test_all_features" smithay-tests: needs: - format - clippy-check strategy: fail-fast: false matrix: features: - '' - backend_winit - backend_drm - backend_gbm - backend_egl - backend_libinput - backend_udev - backend_session - backend_session_logind - backend_session_libseat - backend_x11 - desktop - renderer_gl - wayland_frontend - xwayland - default - test_all_features env: RUSTFLAGS: "-D warnings" runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 - name: Cargo cache uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }} - name: Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable override: true default: true 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 - name: Build cache uses: actions/cache@v2 with: path: target key: ${{ runner.os }}-build-rust_stable-smithay-feature_${{ matrix.features }}-${{ hashFiles('**/Cargo.toml') }} - name: Build and install Libseat if: matrix.features == 'backend_session_libseat' run: | sudo apt-get install meson ninja-build wget https://git.sr.ht/~kennylevinsen/seatd/archive/0.5.0.tar.gz -O libseat-source.tar.gz tar xf libseat-source.tar.gz cd seatd-0.5.0 meson -Dbuiltin=enabled -Dserver=disabled -Dexamples=disabled -Dman-pages=disabled build . ninja -C build sudo meson install -C build - name: Test features uses: actions-rs/cargo@v1 env: RUST_BACKTRACE: full with: command: test args: --no-default-features --features "${{ matrix.features }}" anvil-tests: needs: - format - clippy-check - smithay-tests strategy: fail-fast: false matrix: features: - '' - egl - winit - udev - logind - x11 - default - test_all_features env: RUSTFLAGS: "-D warnings" runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 - name: Cargo cache uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }} - name: Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable override: true default: true 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 - name: Build cache uses: actions/cache@v2 with: path: target key: ${{ runner.os }}-build-rust_stable-anvil-feature_${{ matrix.features }}-${{ hashFiles('**/Cargo.toml') }} - name: Test features uses: actions-rs/cargo@v1 env: RUST_BACKTRACE: full with: command: test args: --manifest-path "./anvil/Cargo.toml" --no-default-features --features "${{ matrix.features }}" anvil-wlcs: needs: - format - clippy-check - 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" runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 - name: Cargo cache uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }} - name: Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable override: true default: true profile: minimal - name: System dependencies 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 with: path: target key: ${{ runner.os }}-build-rust_stable-wlcs-${{ hashFiles('**/Cargo.toml') }} - 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 }}"