Repository navigation
73 lines (64 loc) · 2.33 KB
/
Copy pathrust-tests.yml
File metadata and controls
73 lines (64 loc) · 2.33 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
name: Rust Unit Tests
# Release evidence for every master push that changes the Research Rust inputs
# (.agents/skills/release-maple/scripts/ci_evidence.py), and the only writer of
# the cache that ci.yml's research-rust lane restores on pull requests. Never
# cancelled.
permissions:
contents: read
on:
push:
branches: [master]
paths:
- ".github/workflows/rust-tests.yml"
- "apps/maple-research/frontend/src-tauri/**"
- "proxy/Cargo.toml"
- "sdk/rust/Cargo.toml"
- "sdk/rust/build.rs"
- "sdk/rust/src/**"
- "sdk/rust/assets/**"
- "proxy/src/**"
- "scripts/ci/_common.sh"
- "scripts/ci/rust.sh"
- "scripts/ci/verify-local-rust-deps.sh"
- "scripts/ci/verify-agent-rust-deps.py"
- "scripts/ci/test_agent_rust_deps.py"
- "flake.nix"
- "flake.lock"
# The same compiler settings as ci.yml, so research-rust hits this sccache.
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
CARGO_PROFILE_DEV_DEBUG: "0"
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
jobs:
rust-tests:
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 30
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # was v4
with:
persist-credentials: false
- name: Install Nix
uses: DeterminateSystems/determinate-nix-action@96c5ee93a9dddf2830d31e1da6ec719077336c28 # v3.23.3
with:
source-tag: v3.23.3
github-token: ""
- name: Verify pinned Nix runtime
run: bash scripts/ci/verify-nix-runtime.sh
- name: Cache sccache and Cargo downloads
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # was v4
with:
key: ci-v2-research-rust-${{ hashFiles('apps/maple-research/frontend/src-tauri/Cargo.lock', 'flake.lock') }}
restore-keys: ci-v2-research-rust-
path: |
~/.cache/sccache
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
- name: Run Rust unit tests
run: |
nix develop --no-update-lock-file .#ci -c ./scripts/ci/verify-local-rust-deps.sh
nix develop --no-update-lock-file .#ci -c ./scripts/ci/rust.sh
- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#ci -c ./scripts/ci/sccache-stats.sh