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
This commit is contained in:
co-authored by
Claude Opus 5
parent
037e87bc60
commit
7fba0ab0c3
+25
-16
@@ -14,40 +14,49 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
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:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: check · test · clippy · fmt
|
name: check · test · clippy · fmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, ARM64, spark-1]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
components: rustfmt, clippy
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- run: cargo fmt --all --check
|
- run: cargo fmt --all --check
|
||||||
- run: cargo clippy --workspace --all-targets --all-features
|
- run: cargo clippy --workspace --all-targets --all-features
|
||||||
- run: cargo test --workspace --all-features
|
- run: cargo test --workspace --all-features
|
||||||
|
|
||||||
licences:
|
licences:
|
||||||
name: licence policy (ADR 0002)
|
name: licence policy (ADR 0002)
|
||||||
runs-on: ubuntu-latest
|
runs-on: [self-hosted, Linux, ARM64, spark-1]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: EmbarkStudios/cargo-deny-action@v2
|
- run: cargo deny check licenses bans sources advisories
|
||||||
with:
|
|
||||||
command: check licenses bans sources advisories
|
|
||||||
|
|
||||||
# Native aarch64 build on spark-1. Oracle Cloud's free tier is Ampere A1
|
release:
|
||||||
# (aarch64), so the release artefact must be aarch64 — and spark-1 (GB10,
|
name: release build · aarch64
|
||||||
# 20 cores, 121 GB) builds it natively rather than cross-compiling.
|
|
||||||
aarch64:
|
|
||||||
name: release build · aarch64 (spark-1)
|
|
||||||
runs-on: [self-hosted, Linux, ARM64, spark-1]
|
runs-on: [self-hosted, Linux, ARM64, spark-1]
|
||||||
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
|
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: Swatinem/rust-cache@v2
|
- run: cargo build --release --workspace --locked
|
||||||
- run: cargo build --release --workspace
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: openmail-aarch64
|
name: openmail-aarch64
|
||||||
|
|||||||
Reference in New Issue
Block a user