8000 gh-120111: Don't use cirrus M1 macOS runners on fork (#120116) · estyxx/cpython@535ca32 · GitHub
[go: up one dir, main page]

Skip to content

Commit 535ca32

Browse files
nineteendohugovk
authored andcommitted
pythongh-120111: Don't use cirrus M1 macOS runners on fork (python#120116)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 0382b7d commit 535ca32

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.github/workflows 8000 /build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ jobs:
199199
uses: ./.github/workflows/reusable-macos.yml
200200
with:
201201
config_hash: ${{ needs.check_source.outputs.config_hash }}
202-
# Cirrus is M1, macos-13 is default GHA Intel
203-
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-13"]'
202+
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
203+
# Cirrus used for upstream, macos-14 for forks.
204+
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14", "macos-13"]'
204205

205206
build_macos_free_threading:
206207
name: 'macOS (free-threading)'
@@ -210,8 +211,9 @@ jobs:
210211
with:
211212
config_hash: ${{ needs.check_source.outputs.config_hash }}
212213
free-threading: true
213-
# Cirrus is M1
214-
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma"]'
214+
# Cirrus and macos-14 are M1.
215+
# Cirrus used for upstream, macos-14 for forks.
216+
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14"]'
215217

216218
build_ubuntu:
217219
name: 'Ubuntu'

.github/workflows/reusable-macos.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
build_macos:
17-
name: 'build and test'
17+
name: build and test (${{ matrix.os }})
1818
timeout-minutes: 60
1919
env:
2020
HOMEBREW_NO_ANALYTICS: 1
@@ -27,6 +27,13 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
os: ${{fromJson(inputs.os-matrix)}}
30+
is-fork:
31+
- ${{ github.repository_owner != 'python' }}
32+
exclude:
33+
- os: "ghcr.io/cirruslabs/macos-runner:sonoma"
34+
is-fork: true
35+
- os: "macos-14"
36+
is-fork: false
3037
runs-on: ${{ matrix.os }}
3138
steps:
3239
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)
0