Skip to content

Commit

Permalink
Create rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
willser authored Apr 24, 2022
1 parent 5d0d905 commit 9e097f3
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on: [push, pull_request]

name: CI

jobs:
check_default:
name: cargo check (default features)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: sudo apt-get update && sudo apt-get install libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev pkg-config libfreetype6-dev libfontconfig1-dev
- uses: actions-rs/cargo@v1
with:
command: check
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: rustup component add clippy
- run: sudo apt-get update && sudo apt-get install libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev pkg-config libfreetype6-dev libfontconfig1-dev
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings -W clippy::all

0 comments on commit 9e097f3

Please sign in to comment.