Files
openmail/.github/workflows/ci.yml
T
Karti TripathiandClaude Opus 5 7fba0ab0c3 CI: run every job on spark-1; drop rust-cache
Two failures, two causes.

GitHub-hosted jobs never started: 'recent account payments have failed or
your spending limit needs to be increased'. Not a config problem. Public
repos get hosted runners free, so this may resolve itself; meanwhile every
job runs on spark-1, which is also the deployment architecture (Oracle
Ampere A1 is aarch64), so this is an improvement rather than a workaround.

The aarch64 job failed with exit 127 — cargo not found — and kept failing
after each fix. Cause: Swatinem/rust-cache's post-step prunes ~/.cargo.
That is correct on a GitHub-hosted runner where ~/.cargo is disposable, and
destructive on a self-hosted one where it is the real toolchain. It deleted
~/.cargo/bin/rustup after the first successful run, leaving every shim a
dangling symlink. The action is removed and the toolchain moved to
/opt/rust, wired through the runner's .env and .path, so it is out of reach
even if someone re-adds it. Caching bought nothing here anyway — the runner
keeps its target dir between runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JkyvfNJGTshJNE9FtwPLk7
2026-09-02 13:53:50 -07:00

65 lines
2.2 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Every job runs on spark-1 (aarch64, 20 cores). Two reasons, and the second
# outlives the first:
#
# 1. GitHub-hosted runners are currently unavailable on this account for
# billing reasons. Public repos get them free, so this may be temporary.
# 2. aarch64 is the deployment target — Oracle Cloud's Ampere A1. Testing on
# the architecture we ship is worth more than testing on x86 and hoping.
#
# An x86_64 job is worth adding back once hosted runners work, to catch
# endianness- and width-dependent bugs. Tracked in ROADMAP.md.
#
# ⚠️ Do NOT add Swatinem/rust-cache to these jobs. On a self-hosted runner its
# post-step prunes ~/.cargo — which here is a real, persistent toolchain, not a
# disposable one. It silently deleted the rustup binary and every subsequent
# job failed with exit 127. The toolchain now lives at /opt/rust (wired via the
# runner's .env and .path) partly to put it out of reach, but do not re-add the
# action. The runner keeps its target dir between runs anyway, so caching buys
# nothing here.
jobs:
check:
name: check · test · clippy · fmt
runs-on: [self-hosted, Linux, ARM64, spark-1]
steps:
- uses: actions/checkout@v5
- run: cargo fmt --all --check
- run: cargo clippy --workspace --all-targets --all-features
- run: cargo test --workspace --all-features
licences:
name: licence policy (ADR 0002)
runs-on: [self-hosted, Linux, ARM64, spark-1]
steps:
- uses: actions/checkout@v5
- run: cargo deny check licenses bans sources advisories
release:
name: release build · aarch64
runs-on: [self-hosted, Linux, ARM64, spark-1]
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v5
- run: cargo build --release --workspace --locked
- uses: actions/upload-artifact@v4
with:
name: openmail-aarch64
path: target/release/openmail
if-no-files-found: error