-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.16 KB
/
ci.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
name: CI
on: [push, pull_request, workflow_dispatch]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
id: install_rust
uses: actions-rs/toolchain@v1
with:
components: rustfmt, clippy
- name: Install SDL2
run: |
sudo apt-get update
sudo apt-get install libsdl2-dev
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rust-${{ steps.install_rust.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-${{ steps.install_rust.outputs.rustc_hash }}-
- name: cargo check
run: cargo check --verbose --workspace --all-targets
- name: cargo build
run: cargo build --verbose
- name: cargo test
run: cargo test --verbose --workspace
- name: cargo fmt
run: cargo fmt --verbose --all -- --check
- name: cargo clippy
run: cargo clippy --verbose --workspace