Skip to content

Commit d1f829c

Browse files
committed
ci: run fresh-install workflows only in the upstream repo
1 parent fd3a0b1 commit d1f829c

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/ci-aarch64-fresh-install.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ name: ci-aarch64-fresh-install
1111
# Validates that every published aarch64 asset (xlings, mcpp, musl-gcc) lines
1212
# up and that mcpp can build & run a real `import std` program natively on
1313
# aarch64 — no cross, no qemu. Runs on GitHub's native ARM64 runner.
14+
#
15+
# The job is gated with `github.repository == 'mcpp-community/mcpp'`: the
16+
# weekly schedule runs on the repository's DEFAULT branch, so forks with a
17+
# renamed default branch would otherwise burn their Actions quota on the cron.
1418

1519
on:
1620
workflow_dispatch:
@@ -38,6 +42,7 @@ concurrency:
3842
jobs:
3943
fresh-install:
4044
name: fresh install + native build (aarch64 / glibc)
45+
if: ${{ github.repository == 'mcpp-community/mcpp' }}
4146
runs-on: ubuntu-24.04-arm
4247
timeout-minutes: 60
4348
env:

.github/workflows/ci-fresh-install.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ name: ci-fresh-install
99
#
1010
# This workflow tests released mcpp, not PR code.
1111
# It runs on release publish, manual trigger, and daily schedule.
12+
#
13+
# Every job is gated with `github.repository == 'mcpp-community/mcpp'`: the
14+
# schedule trigger runs on the repository's DEFAULT branch, so a fork that
15+
# renamed its default branch would otherwise burn its Actions quota on the
16+
# daily/weekly cron for no value (fresh-install only tests released mcpp).
17+
# PRs against upstream are unaffected — they run the self-host suites
18+
# (ci-linux / ci-macos / ci-windows).
1219

1320
on:
1421
# NOTE: `release: published` never fires from the release pipeline — the
@@ -69,7 +76,7 @@ jobs:
6976
# Non-workflow_run triggers (manual, cron, PR) skip the wait.
7077
wait-index:
7178
runs-on: ubuntu-latest
72-
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
79+
if: ${{ github.repository == 'mcpp-community/mcpp' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') }}
7380
timeout-minutes: 20
7481
outputs:
7582
version: ${{ steps.resolve.outputs.version }}
@@ -135,7 +142,7 @@ jobs:
135142
linux-fresh:
136143
needs: [wait-index]
137144
name: Linux fresh install
138-
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
145+
if: ${{ github.repository == 'mcpp-community/mcpp' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') }}
139146
runs-on: ubuntu-24.04
140147
timeout-minutes: 60
141148
env:
@@ -245,7 +252,7 @@ jobs:
245252
linux-distro-matrix:
246253
needs: [wait-index]
247254
name: Linux distro (${{ matrix.distro }})
248-
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
255+
if: ${{ github.repository == 'mcpp-community/mcpp' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') }}
249256
runs-on: ubuntu-24.04
250257
container:
251258
image: ${{ matrix.image }}
@@ -338,7 +345,7 @@ jobs:
338345
macos-fresh:
339346
needs: [wait-index]
340347
name: macOS fresh install
341-
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
348+
if: ${{ github.repository == 'mcpp-community/mcpp' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') }}
342349
# macos-14: the support floor (mcpp ≥0.0.50 / xlings ≥0.4.50 ship
343350
# minos=14.0 static-libc++ binaries). A fresh install passing here
344351
# is the continuous proof of the macOS 14 floor — and of host-tool
@@ -416,7 +423,7 @@ jobs:
416423
windows-fresh:
417424
needs: [wait-index]
418425
name: Windows fresh install (${{ matrix.image }})
419-
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
426+
if: ${{ github.repository == 'mcpp-community/mcpp' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') }}
420427
runs-on: ${{ matrix.image }}
421428
timeout-minutes: 30
422429
strategy:
@@ -499,7 +506,7 @@ jobs:
499506
windows-nomsvc-fresh:
500507
needs: [wait-index]
501508
name: Windows fresh install (no Visual Studio)
502-
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
509+
if: ${{ github.repository == 'mcpp-community/mcpp' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') }}
503510
runs-on: windows-2025
504511
timeout-minutes: 30
505512
env:

0 commit comments

Comments
 (0)