Skip to content

Improve CI

Improve CI #147

Workflow file for this run

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
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: restore cache
uses: Swatinem/rust-cache@v2
- name: cargo fmt
# We'll only run this on one platform.
run: cargo fmt --all -- --check
if: runner.os == 'Linux'
- name: Check
run: cargo check