forked from dlunch/RustJava
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 2.05 KB
/
Copy pathrust.yml
File metadata and controls
71 lines (61 loc) · 2.05 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
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
name: Rust CI
jobs:
rust_ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
rust: [stable, beta]
steps:
- name: Prepare git
if: startsWith(matrix.os, 'windows')
run: |-
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v7
with:
submodules: "recursive"
- name: Cache cargo
uses: actions/cache@v6
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo
- name: Cache cargo build
uses: actions/cache@v6
with:
path: target
key: ${{ runner.os }}-${{ matrix.rust }}-build-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.rust }}-build-target-
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
targets: wasm32-unknown-unknown
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy --all -- -D warnings
# test-utils requires tokio rt-multi-thread, which does not compile on wasm
- run: cargo clippy --workspace --exclude test-utils --target wasm32-unknown-unknown -- -D warnings
- run: cargo test --all
# docs-only lock (AGENTS.md "Round Worklog") — one runner, not the 6-cell matrix
worklog_json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: python3 scripts/check-worklog-json.py
# parity lock: the CLAUDE.md DoD block must reproduce this file's checks (see the script's
# docstring — hand comparison failed five rounds in a row). One runner, not the matrix.
dod_parity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: python3 scripts/check-dod-ci-parity.py