-
Notifications
You must be signed in to change notification settings - Fork 8
84 lines (78 loc) · 2.16 KB
/
ci.yml
File metadata and controls
84 lines (78 loc) · 2.16 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
name: CI
on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"
- "LICENSE"
push:
branches:
- main
paths-ignore:
- "docs/**"
- "*.md"
- "LICENSE"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
CARGO_PROFILE_DEV_DEBUG: 1
CARGO_PROFILE_TEST_DEBUG: 1
jobs:
fast-checks:
name: 🏁 Fast Checks (Format)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ubuntu
- name: Install required components
run: rustup component add rustfmt --toolchain nightly
- name: Install taplo
run: cargo install taplo-cli --locked
- name: Run format checks
run: |
taplo format --check --config taplo.toml
cargo +nightly fmt --all -- --check
build-and-test-matrix:
name: 🛠️ Build & Test Matrix
needs: fast-checks
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Ubuntu
if: matrix.os == 'ubuntu-latest'
uses: ./.github/actions/ubuntu
- name: Setup macOS
if: matrix.os == 'macos-latest'
uses: ./.github/actions/macos
- name: compile
run: cargo build --locked --workspace --features runtime-benchmarks,try-runtime
- name: Clean build artifacts to free space
run: |
cargo clean
df -h
- name: test
run: SKIP_WASM_BUILD=1 cargo test --locked --workspace
analysis:
name: 🤖 Analysis (Clippy & Doc)
needs: fast-checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Ubuntu
uses: ./.github/actions/ubuntu
- name: Install required components
run: rustup component add rust-src clippy
- name: Run clippy
run: SKIP_WASM_BUILD=1 cargo clippy --locked --workspace
- name: Run doc
run: SKIP_WASM_BUILD=1 cargo doc --locked --workspace --no-deps