name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install system dependencies (Linux)
if: matrix.platform == 'ubuntu-latest'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxtst-dev libevdev-dev libudev-dev pkg-config
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install nightly rustfmt
shell: bash
run: |
rustup toolchain install nightly --component rustfmt --profile minimal --no-self-update
- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: just, taplo-cli
- name: Check formatting
shell: bash
run: just format-check
- name: Check linting
shell: bash
run: just lint-check
- name: Build
shell: bash
run: just build
- name: Run test suite
shell: bash
run: just test