-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (43 loc) · 1.17 KB
/
main.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
on:
push:
branches:
- master
pull_request:
branches:
- master
name: Rust
jobs:
runner-matrix:
name: format, lint, test
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Build documentation
run: cargo doc --no-deps --workspace
env:
RUSTDOCFLAGS: -D warnings
- name: Run clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build benches
run: cargo build --benches
- name: Run tests without benches
run: >
cargo test
--lib --bins --tests --examples
--
--skip mine_20_blocks_in_40_seconds
--skip hash_rate_independent_of_tx_size
# `--doc` cannot be mixed with other target option
- name: Run documentation tests
run: cargo test --doc