Switch Widget Port #292
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-latest, windows-2019, ubuntu-latest] | |
steps: | |
- name: install libx11-dev | |
run: | | |
sudo apt update | |
sudo apt install libx11-dev libpango1.0-dev libxkbcommon-dev libxkbcommon-x11-dev | |
if: runner.os == 'Linux' | |
- uses: actions/checkout@v3 | |
- name: Rust Toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
# rustfmt is already in the default components, but this is how platform dependencies could be used conditionally | |
# components: ${{ runner.os == 'Linux' && 'rustfmt' || '' }} | |
- name: Restore Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Cargo Format | |
# We'll only run this on one platform. | |
run: cargo fmt --all -- --check | |
if: runner.os == 'Linux' | |
- name: Cargo Clippy | |
run: cargo clippy --workspace -- -D warnings | |
- name: Cargo Test | |
run: cargo test --no-fail-fast --workspace |