-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (31 loc) · 989 Bytes
/
rust.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
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
SIZE_LIMIT: 10KB
steps:
- uses: actions/checkout@v2
- name: Run tests
run: make tests
- name: Check crate package size
run: cargo run -- diet --dry-run --package-size-limit ${{ env.SIZE_LIMIT }}
- name: Check crate package size (with install action)
uses: actions-rs/install@v0.1
with:
crate: cargo-diet
version: latest
- name: Check crate package size (with latest binary)
run: |
curl -LSfs https://github.com/raw/the-lean-crate/cargo-diet/master/ci/install.sh | \
sh -s -- --git the-lean-crate/cargo-diet --target x86_64-unknown-linux-musl --force --tag v1.2.5
cargo diet --dry-run --package-size-limit ${{ env.SIZE_LIMIT }}
- name: fmt
run: cargo fmt --all -- --check
- name: clippy
run: cargo clippy