Skip to content

Wayland exploration #409

Wayland exploration

Wayland exploration #409

Workflow file for this run

name: build
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
build:
name: build ${{ matrix.variant }}
runs-on: ${{matrix.os}}
env:
DISPLAY: ':99'
strategy:
fail-fast: false
matrix:
include:
- variant: ubuntu-x11-latest
os: ubuntu-latest
headless: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
dependencies: sudo apt-get install libxtst-dev libevdev-dev libudev-dev --assume-yes
build: cargo build --verbose
test: cargo test --verbose --features=serialize,x11
- variant: ubuntu-wayland-latest
os: ubuntu-latest
headless: weston --no-config --socket=wl-test-env --backend=headless &
dependencies: sudo apt-get install libudev-dev libinput-dev weston --assume-yes
build: cargo build --verbose --no-default-features --features wayland
test: WAYLAND_DISPLAY=wl-test-env cargo test --verbose --no-default-features --features=serialize,wayland
- variant: macos-latest
os: macos-latest
build: cargo build --verbose
# TODO: We can't test this on github, we can't set accessibility yet.
test: cargo test --verbose --all-features -- --skip test_listen_and_simulate --skip test_grab
- variant: windows-latest
os: windows-latest
build: cargo build --verbose
test: cargo test --verbose --all-features
steps:
- uses: actions/checkout@v4
- name: CargoFmt
run: rustup component add rustfmt
- name: Dependencies
run: ${{matrix.dependencies}}
- name: Setup headless environment
run: ${{matrix.headless}}
- name: Check formatting
run: |
rustup component add rustfmt
cargo fmt -- --check
- name: Build
run: ${{ matrix.build }}
- name: Run tests
run: ${{matrix.test}}
- name: Linter
run: |
rustup component add clippy
cargo clippy --all-features --verbose -- -Dwarnings