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).
71 lines
2.0 KiB
YAML
71 lines
2.0 KiB
YAML
# This file defines an action that builds the various Docker images used to run
|
|
# libc++ CI whenever modifications to those Docker files are pushed to `main`.
|
|
#
|
|
# The images are pushed to the LLVM package registry at https://github.com/orgs/llvm/packages
|
|
# and tagged appropriately. The selection of which Docker image version is used by the libc++
|
|
# CI nodes at any given point is controlled from the workflow files themselves.
|
|
|
|
name: Build Docker images for libc++ CI
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'libcxx/utils/ci/**'
|
|
- '.github/workflows/libcxx-build-containers.yml'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'libcxx/utils/ci/**'
|
|
- '.github/workflows/libcxx-build-containers.yml'
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-24.04
|
|
if: github.repository_owner == 'llvm'
|
|
permissions:
|
|
packages: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Build the Linux builder image
|
|
working-directory: libcxx/utils/ci
|
|
run: docker compose build actions-builder
|
|
env:
|
|
TAG: ${{ github.sha }}
|
|
|
|
# - name: Build the Android builder image
|
|
# working-directory: libcxx/utils/ci
|
|
# run: docker compose build android-buildkite-builder
|
|
# env:
|
|
# TAG: ${{ github.sha }}
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Push the Linux builder image
|
|
if: github.event_name == 'push'
|
|
working-directory: libcxx/utils/ci
|
|
run: |
|
|
docker compose push actions-builder
|
|
env:
|
|
TAG: ${{ github.sha }}
|
|
|
|
# - name: Push the Android builder image
|
|
# if: github.event_name == 'push'
|
|
# working-directory: libcxx/utils/ci
|
|
# run: |
|
|
# docker compose push android-buildkite-builder
|
|
# env:
|
|
# TAG: ${{ github.sha }}
|