-
Notifications
You must be signed in to change notification settings - Fork 17
69 lines (69 loc) · 2.05 KB
/
tests.yaml
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
name: tests
on:
push:
branches: [main, test]
pull_request: {}
env:
RUST_BACKTRACE: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --all-targets --all-features
build-musl:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install clang-18
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- run: TARGET_CC=clang-18 TARGET_AR=llvm-ar-18 cargo build --all-targets --all-features --target x86_64-unknown-linux-musl
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --all-targets --all-features
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features
test-musl:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install clang-18
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- run: TARGET_CC=clang-18 TARGET_AR=llvm-ar-18 cargo test --all-features --target x86_64-unknown-linux-musl
test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features -- --nocapture
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: cargo-bins/cargo-binstall@main
- run: cargo binstall cargo-deny
- run: cargo clippy --all-targets --all-features -- -Dwarnings
- run: cargo fmt --check
- run: cargo deny check
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo doc
- run: cargo test --doc --all-features