Repository navigation
121 lines (111 loc) · 5.02 KB
/
Copy pathrust.yml
File metadata and controls
121 lines (111 loc) · 5.02 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
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
115
116
117
118
119
120
121
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
# a new push to a pull request makes the run in progress redundant
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Check formatting
run: cargo fmt --all --check
- name: Build
run: cargo check --workspace --locked --all-targets
- name: Run tests
run: cargo test --workspace --locked --release
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Run clippy
run: cargo clippy --workspace --locked --all-targets -- -D warnings
# the release profile turns off the overflow checks and debug assertions, so
# the tests are run once more without it
test-debug:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Run tests
run: cargo test --workspace --locked
# the tests and clippy again with the pair term on the seeded rank 8 table,
# in debug so the state check runs
test-machine:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Run tests with the pair term on
run: cargo test --workspace --locked --features machine-test
- name: Run clippy with the pair term on
run: cargo clippy --workspace --locked --all-targets --features machine-test -- -D warnings
# .cargo/config.toml builds for x86-64-v2, so every x86 job above runs the
# quiet ordering's SSE forms; this runs the tests on the scalar forms the
# baseline archive ships, where a fault in them would otherwise show only
# on the arm build
test-baseline:
runs-on: ubuntu-latest
env:
RUSTFLAGS: -C target-cpu=x86-64
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Run tests on the baseline target
run: cargo test --workspace --locked --release
# The tactical and the strategic suites, gating, on one platform: a fixed
# depth and table make their totals exact on any machine, and twenty seconds
# or more of searching is not worth paying three times over a matrix that
# would agree with itself. They are ignored in the default run and asked
# for by name, a step each, and the second runs whether or not the first
# passed.
#
# cargo test exits 0 when the name filter matches nothing, so a renamed or
# moved test would keep this green having run nothing. Each step therefore
# ends in a grep for the line saying its test ran and passed. grep ends the
# pipeline, so its status is the step's under the default shell (bash -e
# without pipefail), and tee keeps the output in the log.
tactics:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Run the tactical suite
run: cargo test --release --locked -p arche-core -- --ignored the_suite_finds_what_it_found_before --nocapture | tee /dev/stderr | grep -qxF "test tactics::tests::the_suite_finds_what_it_found_before ... ok"
- name: Run the strategic suite
if: ${{ !cancelled() }}
run: cargo test --release --locked -p arche-core -- --ignored the_strategy_suite_scores_what_it_scored_before --nocapture | tee /dev/stderr | grep -qxF "test strategy::tests::the_strategy_suite_scores_what_it_scored_before ... ok"
# checks that the rust-version in the manifests is still true
minimum-supported-rust-version:
runs-on: ubuntu-latest
env:
# takes precedence over rust-toolchain.toml
RUSTUP_TOOLCHAIN: "1.85"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# the ref names the toolchain to install, not a version of the action, so
# a bump would move this job off the version it exists to check.
# .github/dependabot.yml keeps it out of the bumps.
- uses: dtolnay/rust-toolchain@85c23e28f7ccc75a9a153d45d385d94a85464876 # 1.85
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Check the workspace
run: cargo check --workspace --locked --all-targets