-
Notifications
You must be signed in to change notification settings - Fork 19
53 lines (46 loc) · 1.17 KB
/
rust-checks.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
45
46
47
48
49
50
51
52
53
---
name: Rust checks
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
main:
name: Run check, test and lints
runs-on: [self-hosted, Linux, X64, large]
env:
CARGO_INCREMENTAL: 0
RUSTC_WRAPPER: sccache
steps:
- name: Checkout Source code
uses: actions/checkout@v3
- name: Install Rust Toolchain
uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v1
with:
targets: wasm32-unknown-unknown
components: clippy rustfmt
- name: Run Format Checks
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all
- name: Run Linter
uses: actions-rs/cargo@v1
env:
# https://github.com/mozilla/sccache/issues/966
RUSTC_WRAPPER: ""
RUSTC_WORKSPACE_WRAPPER: sccache
with:
command: clippy
args: --all-targets -- --no-deps -D warnings
- name: Run Unit Test Suite
uses: actions-rs/cargo@v1
with:
command: test