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
name: Embedded
# Split into its own workflow so it carries its own status badge. A
# badge is per workflow, not per job, so a suite whose result the README
# advertises has to be a workflow of its own.
on:
push:
branches:
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
# The profile written for CI: a slower, noisier host gets a looser
# slow-timeout than a workstation, and one retry so a genuinely flaky
# test is reported as flaky rather than as a failure. See
# `.config/nextest.toml`.
NEXTEST_PROFILE: ci
RUSTFLAGS: -D warnings
# Every `run` step goes through `bash -eo pipefail` rather than
# GitHub's default `bash -e`. Without `pipefail` a step like
# `just cov-summary | tee summary.txt` reports `tee`'s exit status,
# so a recipe that died with "command not found" still concluded
# green and published an empty report.
defaults:
run:
shell: bash
jobs:
# Tier A embedded: Linux-class targets with std (Cortex-A boards,
# ESP32-S3 under esp-idf). These compile today, and nothing stopped
# them regressing - a new `cfg(unix)` dependency or a
# `target_os = "linux"` assumption would break them silently between
# releases. Checking the examples too keeps the embedded measuring
# harness itself cross-compilable.
embedded-tier-a:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Check the library and tools
run: cargo check --workspace --target ${{ matrix.target }}
- name: Check the examples
run: cargo check --examples --target ${{ matrix.target }}
# The embedded budget is a measured claim, so it is re-measured on
# every run rather than quoted from a README. Both figures land in
# the job summary: memory high-water through a full lifecycle, and
# worst-case stack depth per code path.
# The embedded budget is a measured claim, so it is re-measured on
# every run rather than quoted from a README. Both figures land in
# the job summary: memory high-water through a full lifecycle, and
# worst-case stack depth per code path.
embedded-budget:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: extractions/setup-just@v2
- name: Add the wasm target
run: rustup target add wasm32-wasip1
- uses: bytecodealliance/actions/wasmtime/setup@v1
- name: Memory high-water, every profile on both hosts
run: |
set -euo pipefail
just wasm-budget 20000 | tee profile-memory.txt
- name: Worst-case stack depth per path
run: |
set -euo pipefail
cargo run --release --example stack_depth -- \
"$RUNNER_TEMP/regolith-stack" | tee stack-depth.txt
- name: Publish the embedded budget
run: |
{
echo "## Embedded budget"
echo ""
echo "### Memory high-water: embedded, wasm and default, on x86_64 and wasm32-wasip1"
echo '```'
cat profile-memory.txt
echo '```'
echo "### Stack depth"
echo '```'
cat stack-depth.txt
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
# Loom model checking. Exhaustive over the C11 interleavings the
# memtable's publication protocol and the read horizon permit, which
# no amount of stress testing covers. Both profiles run: the skip
# list's single-writer guard is a `debug_assert`, so its calibration
# only exists in a debug build.