This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (54 loc) · 1.68 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CI suite
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
submodules: recursive
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2022-10-28
targets: wasm32-unknown-unknown
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Build
run: cargo +nightly-2022-10-28 check --all --benches --workspace
- name: Build `no-std`
run: cargo +nightly-2022-10-28 build -p ismp --no-default-features --verbose --target=wasm32-unknown-unknown
- name: Run tests
run: cargo +nightly-2022-10-28 test --all-features --workspace --verbose
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
submodules: recursive
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2022-10-28
components: rustfmt, clippy
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Check format
run: cargo +nightly-2022-10-28 fmt --all --check
- name: Check clippy
run: cargo +nightly-2022-10-28 clippy --all-targets --workspace --all-features --verbose -- -D warnings