-
Notifications
You must be signed in to change notification settings - Fork 82
114 lines (107 loc) · 3.6 KB
/
exhaustive.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: exhaustive
env:
RUST_BACKTRACE: 1
jobs:
test:
name: cargo test
strategy:
matrix:
platform:
- { toolchain: stable, target: i686-pc-windows-msvc, os: windows-latest }
- { toolchain: stable, target: i686-unknown-linux-gnu, os: ubuntu-latest }
- { toolchain: stable, target: x86_64-apple-darwin, os: macos-latest }
- { toolchain: stable, target: x86_64-pc-windows-msvc, os: windows-latest }
- { toolchain: stable, target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.platform.toolchain }}
target: ${{ matrix.platform.target }}
- uses: taiki-e/install-action@v2
with: { tool: cargo-nextest }
- run: cargo --locked nextest run --workspace --all-features
- run: cargo --locked test --workspace --doc --all-features
min-versions-shallow:
name: cargo test --shallow-minimal-versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly }
- name: Update to shallow minimal versions
run:
cargo update $(
cargo metadata --all-features --format-version 1
| jq -r '
. as $root
| .resolve.nodes[]
| select(.id == $root.resolve.root)
| .deps[].pkg
| . as $dep
| $root.packages[]
| select(.id == $dep)
| "-p", "\(.name):\(.version)"
'
) -Z minimal-versions
- uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: stable }
- uses: taiki-e/install-action@v2
with: { tool: cargo-nextest }
- run: cargo --locked nextest run --workspace --all-features
- run: cargo --locked test --workspace --doc --all-features
min-versions:
name: cargo test minimal-versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly }
- name: Update to minimal versions
run:
cargo update -Z minimal-versions
- uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: stable }
- uses: taiki-e/install-action@v2
with: { tool: cargo-nextest }
- run: cargo --locked nextest run --workspace --all-features
- run: cargo --locked test --workspace --doc --all-features
check-features:
name: cargo hack check --feature-powerset
runs-on: ubuntu-latest
env:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@v2
with: { tool: cargo-hack }
- run:
cargo hack check
--workspace
--feature-powerset
--no-dev-deps
--skip 'all,all-algorithms,all-implementations'
check-test-features:
name: cargo hack check --all-targets --feature-powerset
runs-on: ubuntu-latest
env:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@v2
with: { tool: cargo-hack }
- run:
cargo hack check
--workspace
--feature-powerset
--all-targets
--skip 'all,all-algorithms,all-implementations'
on:
merge_group:
types: [checks_requested]
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]