ci: build for the machine that exists, on the runner that exists
This workflow has never once gone green on this instance: 23 runs cancelled, 2 waiting, zero successes. Not a regression -- it has been decorative since it was written, because it describes GitHub's hosted fleet and runs on one self-hosted aarch64 Pi advertising ["ubuntu-latest","ubuntu-24.04", "ubuntu-22.04"]. Two failures, both configuration rather than code: `windows-latest` and `macos-latest` match no runner label, so those jobs sit in WAITING for ever and the RUN never reaches a terminal state. A pull request's checks therefore never resolve either way -- not red, just never finished, which is worse than red because a red check tells you something. Removed: a second architecture here needs a second runner, not a second matrix row. `--target x86_64-unknown-linux-gnu` on an aarch64 host makes every build a cross-compile, and `wayland-sys`'s build script dies on it with "pkg-config has not been configured to support cross-compilation". Dropped; the native job now builds for its host. NOT touched, deliberately: the WASM and Formatting jobs still fail, on real code state rather than on configuration -- `getrandom` needs the `wasm_js` backend for wasm32-unknown-unknown, and `cargo fmt --check` reports a ~13,000 line diff across the tree. Editing those two into passing is precisely the leniency with an expiry date nobody sets that PROTOCOL.md now forbids. They are issues, not workflow lines. (One latent defect noted while reading: `jetli/trunk-action` fetches trunk-x86_64-unknown-linux-gnu onto this aarch64 host. It has never been reached because the WASM check fails first, and it will bite the moment that is fixed.) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01McNbzUeq1KRBWs4G6X2YVj
This commit is contained in:
49
.github/workflows/ci.yml
vendored
49
.github/workflows/ci.yml
vendored
@@ -10,36 +10,45 @@ env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
# ── What this file may assume about where it runs ────────────────────────────
|
||||
#
|
||||
# It runs on ONE self-hosted runner: `rpi5-runner`, aarch64, advertising
|
||||
# ["ubuntu-latest", "ubuntu-24.04", "ubuntu-22.04"]. Nothing else exists.
|
||||
#
|
||||
# This file was written for GitHub's hosted fleet — three operating systems and
|
||||
# x86_64 throughout — and had never once gone green here: 23 runs cancelled, 2
|
||||
# waiting, zero successes. Two separate reasons, and both are configuration
|
||||
# describing a world that is not this one:
|
||||
#
|
||||
# * `windows-latest` / `macos-latest` match no runner label, so those jobs sit
|
||||
# in WAITING for ever. The run therefore never reaches a terminal state, and
|
||||
# a pull request's checks never resolve either way — not red, just never
|
||||
# finished. That is worse than a failure: a red check tells you something.
|
||||
# * `--target x86_64-unknown-linux-gnu` on an aarch64 host makes every build a
|
||||
# cross-compile, and `wayland-sys`'s build script dies on it —
|
||||
# "pkg-config has not been configured to support cross-compilation".
|
||||
#
|
||||
# So: one job, on the machine that exists, building for the machine that exists.
|
||||
# If a second architecture is ever wanted here it needs a second RUNNER, not a
|
||||
# second matrix row.
|
||||
|
||||
jobs:
|
||||
# ── Native builds: Windows, macOS, Linux ────────────────────────────────────
|
||||
# ── Native build, on the one runner there is ────────────────────────────────
|
||||
native:
|
||||
name: Native — ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
- os: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
name: Native — linux
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Cache Cargo registry and build
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
# Linux: install Bevy's system dependencies (X11, Wayland, audio)
|
||||
- name: Install Linux system dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
@@ -52,16 +61,16 @@ jobs:
|
||||
pkg-config
|
||||
|
||||
- name: Check (fast compile check)
|
||||
run: cargo check --workspace --target ${{ matrix.target }}
|
||||
run: cargo check --workspace
|
||||
|
||||
- name: Build (debug)
|
||||
run: cargo build --workspace --target ${{ matrix.target }}
|
||||
run: cargo build --workspace
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test --workspace --target ${{ matrix.target }}
|
||||
run: cargo test --workspace
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy --workspace --target ${{ matrix.target }} -- -D warnings
|
||||
run: cargo clippy --workspace -- -D warnings
|
||||
|
||||
# ── WASM / Web build ─────────────────────────────────────────────────────────
|
||||
wasm:
|
||||
|
||||
Reference in New Issue
Block a user