-
-
Notifications
You must be signed in to change notification settings - Fork 119
63 lines (58 loc) · 1.5 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
name: CI
# Define the triggers; usually merges to the repository
# default branch and pull-requests
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
env:
CARGO_TERM_COLOR: always
defaults:
run:
shell: bash
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --workspace --all-features -- -D warnings
- name: Reject uncommitted changes
run: git diff --exit-code
- name: Build documentation
run: cargo doc --no-deps --document-private-items --all-features --workspace
env:
RUSTDOCFLAGS: -D warnings
- name: Run `cross-compiler`
run: cargo run --package cross-compiler
test:
name: Test
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{matrix.os}}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
- name: Run `cargo build`
run: cargo build --all-features
- name: Run `cargo test`
run: cargo test --all-features
- name: Run `export-validator`
run: cargo run --package export-validator