The aarch64 job targets the spark-1 self-hosted runner, whose labels are registered as 'Linux' not 'linux'. Cargo.lock is committed because the Dockerfile builds with --locked and a lockfile-free reproducible build is not reproducible. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JkyvfNJGTshJNE9FtwPLk7
56 lines
1.6 KiB
YAML
56 lines
1.6 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
|
|
|
|
jobs:
|
|
check:
|
|
name: check · test · clippy · fmt
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- 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 clippy --workspace --all-targets --all-features
|
|
- run: cargo test --workspace --all-features
|
|
|
|
licences:
|
|
name: licence policy (ADR 0002)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: EmbarkStudios/cargo-deny-action@v2
|
|
with:
|
|
command: check licenses bans sources advisories
|
|
|
|
# Native aarch64 build on spark-1. Oracle Cloud's free tier is Ampere A1
|
|
# (aarch64), so the release artefact must be aarch64 — and spark-1 (GB10,
|
|
# 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]
|
|
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: cargo build --release --workspace
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: openmail-aarch64
|
|
path: target/release/openmail
|
|
if-no-files-found: error
|