Skip to content

Cleaned platform ifs up #36

Cleaned platform ifs up

Cleaned platform ifs up #36

Workflow file for this run

name: Validate
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
APT_PACKAGES: libatk1.0-dev libpango1.0-dev libgtk-3-dev libudev-dev libxdo-dev
jobs:
formatting:
name: "Format"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@master
- name: "Rust"
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
- name: "Format"
run: cargo fmt -- --check
clippy:
name: "Clippy"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@master
- name: "Rust"
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: "Dependencies"
run: sudo apt-get install -y ${{ env.APT_PACKAGES }}
- name: "Clippy"
run: cargo clippy -- -D warnings
check:
name: "Check"
runs-on: ubuntu-latest
strategy:
matrix:
target: ["x86_64-pc-windows-gnu", "x86_64-unknown-linux-gnu"]
steps:
- name: "Checkout"
uses: actions/checkout@master
- name: "Rust"
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: "Dependencies"
if: contains(matrix.target, 'linux')
run: sudo apt-get install -y ${{ env.APT_PACKAGES }}
- name: "Check"
run: cargo check --target ${{ matrix.target }}