-
Notifications
You must be signed in to change notification settings - Fork 38
44 lines (37 loc) · 1.22 KB
/
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
36
37
38
39
40
41
42
43
44
name: Rust CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as the cache uses the current rustc version as its cache key
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-unknown-unknown, aarch64-linux-android
components: rustfmt, clippy
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libatk1.0-dev libgtk-3-dev build-essential
- name: Cache
uses: Swatinem/rust-cache@v2
# Split into separate jobs for parallelization
- name: Build
run: |
cargo build --all-features --verbose
cargo build --target wasm32-unknown-unknown --verbose
- name: Lint
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Check format
run: cargo fmt -- --check