cb424d7448
verify-patch-sanity.py validates every active recipe .patch has internally- consistent hunk line counts — catching the 'malformed patch at line N' failure at commit/CI/preflight time instead of hours into a cook. This cycle hit that class three times (qtwaylandscanner, sddm, xwayland), each only discovered when cookbook tried to apply the patch. Running it across the repo found 29 latent malformed patches (validated against GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22'). They were harmless only because they sit in vendored recipes (baked, not re- applied) — but would fail on any version-bump re-derivation. --fix recounts the hunk headers (body untouched) and repaired all 29. Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test (test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats (empty placeholders, bare-@@ git hunks).
75 lines
2.4 KiB
YAML
75 lines
2.4 KiB
YAML
name: CI Checks (Rust fork)
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
# When a PR is closed, we still start this workflow, but then skip
|
|
# all the jobs, which makes it effectively a no-op. The reason to
|
|
# do this is that it allows us to take advantage of concurrency groups
|
|
# to cancel in progress CI jobs whenever the PR is closed.
|
|
- closed
|
|
push:
|
|
branches:
|
|
- 'rustc/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
premerge-checks-linux:
|
|
name: Build and Test Linux
|
|
if: >-
|
|
github.repository_owner == 'rust-lang' &&
|
|
(github.event_name != 'pull_request' || github.event.action != 'closed')
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout LLVM
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Free up disk space
|
|
run: |
|
|
curl -sSL https://raw.githubusercontent.com/rust-lang/rust/474466dc16f890083af1cdebad0aebf4d4ba88d7/src/ci/scripts/free-disk-space.sh | bash
|
|
- name: Install clang-18
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y clang-18 cmake ninja-build
|
|
- name: Build and Test
|
|
run: |
|
|
cmake -S llvm -B build -G Ninja \
|
|
-DLLVM_ENABLE_PROJECTS=lld \
|
|
-DLLVM_ENABLE_ASSERTIONS=ON \
|
|
-DLLVM_ENABLE_LLD=ON \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_C_COMPILER=/usr/bin/clang-18 \
|
|
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-18
|
|
ninja -C build check-llvm check-lld
|
|
|
|
premerge-check-macos:
|
|
name: Build and Test macOS
|
|
runs-on: macos-14
|
|
if: >-
|
|
github.repository_owner == 'rust-lang' &&
|
|
(github.event_name != 'pull_request' || github.event.action != 'closed')
|
|
steps:
|
|
- name: Checkout LLVM
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Build and Test
|
|
run: |
|
|
cmake -S llvm -B build -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DLLDB_INCLUDE_TESTS=OFF \
|
|
-DLLVM_ENABLE_ASSERTIONS=ON \
|
|
-DCMAKE_C_COMPILER=/usr/bin/clang \
|
|
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
|
|
ninja -C build check-llvm
|