-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (31 loc) · 918 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install libxkbcommon-dev libwayland-dev libudev-dev
- uses: actions/checkout@v2
- name: Stable
run: cargo test
- name: Stable no-features
run: cargo build --no-default-features
- name: Oldstable
run: |
oldstable=$(cat Cargo.toml | grep "rust-version" | sed 's/.*"\(.*\)".*/\1/')
rustup toolchain install --profile minimal $oldstable
rustup default $oldstable
cargo test
- name: Clippy
run: |
rustup component add clippy
cargo clippy --all-targets
- name: Rustfmt
run: |
rustup toolchain install nightly -c rustfmt
cargo +nightly fmt -- --check