Split the Gitea job so graduation does not break CI on the runner
The single rust job ran cargo clippy --workspace, which after graduation pulls GPUI onto a runner that has neither the X11 development packages nor a measured disk budget. It would have failed on the next push. rust-headless gates every push and stays fast. rust-ui installs the native dependencies, reports df before and after so the runner's actual budget gets measured, and is continue-on-error until it has run green a few times — a job that OOMs on every push trains people to ignore CI, which is worse than one that reports without blocking. The flag comes off on evidence, not on assumption. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
316fa32745
commit
2e349282c8
+60
-7
@@ -5,7 +5,8 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
rust:
|
||||
# Everything except the GPUI product. Builds in seconds, gates every push.
|
||||
rust-headless:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -17,11 +18,63 @@ jobs:
|
||||
toolchain: 1.94.1
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Format
|
||||
run: cargo fmt --all --check
|
||||
- name: Cache cargo
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: headless-${{ hashFiles('Cargo.lock') }}
|
||||
|
||||
- name: Lint
|
||||
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||
- name: Headless checks
|
||||
run: ./scripts/ci.sh --headless
|
||||
|
||||
- name: Test
|
||||
run: cargo test --workspace --all-features
|
||||
# The GPUI product. Kept separate because it pulls a window toolkit, several
|
||||
# hundred extra packages, and a large target directory.
|
||||
#
|
||||
# continue-on-error until this runner's disk, memory, and time budget have
|
||||
# actually been measured against a GPUI build. A job that OOMs on every push
|
||||
# trains people to ignore CI, which is worse than a job that reports and does
|
||||
# not block. Remove the flag once it has run green a few times; do not remove
|
||||
# it by assuming it will.
|
||||
rust-ui:
|
||||
runs-on: ubuntu-latest
|
||||
needs: rust-headless
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install pinned Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: 1.94.1
|
||||
components: rustfmt, clippy
|
||||
|
||||
# GPUI's X11 backend links against these. libxkbcommon-x11-dev is the
|
||||
# package scripts/native-libs.sh works around when it is missing.
|
||||
- name: Install native dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libxkbcommon-x11-dev libxcb1-dev libwayland-dev \
|
||||
libasound2-dev libfontconfig1-dev pkg-config
|
||||
|
||||
- name: Cache cargo
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ui-${{ hashFiles('Cargo.lock') }}
|
||||
|
||||
- name: Report disk before build
|
||||
run: df -h .
|
||||
|
||||
- name: UI checks
|
||||
run: ./scripts/ci.sh --ui
|
||||
|
||||
- name: Report disk after build
|
||||
run: df -h .
|
||||
|
||||
Reference in New Issue
Block a user