Repository navigation
76 lines (67 loc) · 2.51 KB
/
Copy pathrust-tests.yml
File metadata and controls
76 lines (67 loc) · 2.51 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
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Nix
uses: DeterminateSystems/determinate-nix-action@16f94ba7aae399b9f9077c254b6719ec6de7e3e3 # v3.24.2
with:
source-tag: v3.24.2
github-token: ""
# HTTP/2 stream resets from cache.nixos.org make Nix resume past
# the end of a NAR (HTTP 416); HTTP/1.1 avoids the resets.
extra-conf: http2 = false
- name: Verify pinned Nix runtime
run: bash scripts/ci/verify-nix-runtime.sh
- name: Cache sccache and Cargo downloads
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
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