Skip to content

Commit cadf19d

Browse files
committed
ci(pip-build): respect disable-build-* labels for ubuntu / macos
`test-pip-build` (the workflow_call into pip-build.yml) ignored the `disable-build-<platform>` PR labels and always tried to run the full manylinux + macOS matrix. That bit PR #6090: a `disable-build-linux-vcpkg` label suppressed the prepare-image step, but `test-pip-build` still tried to pull the branch-tagged Rocky Linux image and failed with `manifest unknown`. Plumb three new boolean inputs through pip-build.yml -- `disable_ubuntu_x64`, `disable_ubuntu_arm64`, `disable_macos` -- and gate the matching build/test jobs: - manylinux-pip-build / manylinux-pip-test: per-platform `if:` keyed on `matrix.platform` so x86_64 and aarch64 can be disabled independently (matches the `disable-build-ubuntu-{x64,arm64}` split elsewhere). - macos-pip-build / macos-pip-test: single `if:` gated on `disable_macos` (both x86 and arm64 macOS variants together, matching the single `disable-build-macos` label). `build-test-distribute.yml` derives the three flags from the same `build_enable_<platform>` outputs that `prepare-image` already uses on the adjacent line. Out of scope (not requested): `disable-build-windows` (windows-pip-build keeps running) and `disable-build-emscripten` (pip-build.yml has no emscripten target).
1 parent c0c1b74 commit cadf19d

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/build-test-distribute.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,11 @@ jobs:
318318
uses: ./.github/workflows/pip-build.yml
319319
with:
320320
vcpkg_docker_image_tag: ${{ needs.config.outputs.vcpkg_docker_image_tag }}
321+
# Honor `disable-build-<platform>` PR labels so test-pip-build skips the
322+
# same platforms as the rest of CI.
323+
disable_ubuntu_x64: ${{ needs.config.outputs.build_enable_ubuntu_x64 != 'true' }}
324+
disable_ubuntu_arm64: ${{ needs.config.outputs.build_enable_ubuntu_arm64 != 'true' }}
325+
disable_macos: ${{ needs.config.outputs.build_enable_macos != 'true' }}
321326

322327
collect-stats:
323328
timeout-minutes: 5

.github/workflows/pip-build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ on:
3131
default: false
3232
required: false
3333
type: boolean
34+
disable_ubuntu_x64:
35+
default: false
36+
required: false
37+
type: boolean
38+
disable_ubuntu_arm64:
39+
default: false
40+
required: false
41+
type: boolean
42+
disable_macos:
43+
default: false
44+
required: false
45+
type: boolean
3446

3547
env:
3648
VCPKG-VERSION: '2026.03.18'
@@ -57,6 +69,12 @@ jobs:
5769

5870
manylinux-pip-build:
5971
needs: setup
72+
# Skip per-platform when the caller passes the matching disable_* flag.
73+
# `disable-build-ubuntu-x64` / `disable-build-ubuntu-arm64` PR labels in
74+
# `build-test-distribute.yml` map to these inputs.
75+
if: |
76+
(matrix.platform == 'x86_64' && inputs.disable_ubuntu_x64 != true) ||
77+
(matrix.platform == 'aarch64' && inputs.disable_ubuntu_arm64 != true)
6078
timeout-minutes: 80
6179
runs-on: ${{ matrix.runner }}
6280
container:
@@ -358,6 +376,7 @@ jobs:
358376

359377
macos-pip-build:
360378
needs: setup
379+
if: ${{ inputs.disable_macos != true }}
361380
timeout-minutes: 120
362381
runs-on: ${{ matrix.instance }}
363382
strategy:
@@ -448,6 +467,9 @@ jobs:
448467

449468
manylinux-pip-test:
450469
needs: [manylinux-pip-build]
470+
if: |
471+
(matrix.platform == 'x86_64' && inputs.disable_ubuntu_x64 != true) ||
472+
(matrix.platform == 'aarch64' && inputs.disable_ubuntu_arm64 != true)
451473
timeout-minutes: 20
452474
runs-on: ${{ matrix.runner }}
453475
container:
@@ -571,6 +593,7 @@ jobs:
571593

572594
macos-pip-test:
573595
needs: [macos-pip-build]
596+
if: ${{ inputs.disable_macos != true }}
574597
timeout-minutes: 40
575598
runs-on: ${{ matrix.instance }}
576599
strategy:

0 commit comments

Comments
 (0)