mirror of https://github.com/python/cpython
Move macOS matrix to the calling workflow (#121809)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
5f6001130f
commit
1d607fe759
|
@ -249,27 +249,38 @@ jobs:
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
|
|
||||||
build_macos:
|
build_macos:
|
||||||
name: 'macOS'
|
name: >-
|
||||||
|
macOS
|
||||||
|
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
|
||||||
needs: check_source
|
needs: check_source
|
||||||
if: needs.check_source.outputs.run_tests == 'true'
|
if: needs.check_source.outputs.run_tests == 'true'
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
|
||||||
|
# macOS 13 only runs tests against the GIL-enabled CPython.
|
||||||
|
# Cirrus used for upstream, macos-14 for forks.
|
||||||
|
os:
|
||||||
|
- ghcr.io/cirruslabs/macos-runner:sonoma
|
||||||
|
- macos-14
|
||||||
|
- macos-13
|
||||||
|
is-fork: # only used for the exclusion trick
|
||||||
|
- ${{ github.repository_owner != 'python' }}
|
||||||
|
free-threading:
|
||||||
|
- false
|
||||||
|
- true
|
||||||
|
exclude:
|
||||||
|
- os: ghcr.io/cirruslabs/macos-runner:sonoma
|
||||||
|
is-fork: true
|
||||||
|
- os: macos-14
|
||||||
|
is-fork: false
|
||||||
|
- os: macos-13
|
||||||
|
free-threading: true
|
||||||
uses: ./.github/workflows/reusable-macos.yml
|
uses: ./.github/workflows/reusable-macos.yml
|
||||||
with:
|
with:
|
||||||
config_hash: ${{ needs.check_source.outputs.config_hash }}
|
config_hash: ${{ needs.check_source.outputs.config_hash }}
|
||||||
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
|
free-threading: ${{ matrix.free-threading }}
|
||||||
# Cirrus used for upstream, macos-14 for forks.
|
os: ${{ matrix.os }}
|
||||||
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14", "macos-13"]'
|
|
||||||
|
|
||||||
build_macos_free_threading:
|
|
||||||
name: 'macOS (free-threading)'
|
|
||||||
needs: check_source
|
|
||||||
if: needs.check_source.outputs.run_tests == 'true'
|
|
||||||
uses: ./.github/workflows/reusable-macos.yml
|
|
||||||
with:
|
|
||||||
config_hash: ${{ needs.check_source.outputs.config_hash }}
|
|
||||||
free-threading: true
|
|
||||||
# Cirrus and macos-14 are M1.
|
|
||||||
# Cirrus used for upstream, macos-14 for forks.
|
|
||||||
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14"]'
|
|
||||||
|
|
||||||
build_ubuntu:
|
build_ubuntu:
|
||||||
name: >-
|
name: >-
|
||||||
|
@ -596,7 +607,6 @@ jobs:
|
||||||
- check-docs
|
- check-docs
|
||||||
- check_generated_files
|
- check_generated_files
|
||||||
- build_macos
|
- build_macos
|
||||||
- build_macos_free_threading
|
|
||||||
- build_ubuntu
|
- build_ubuntu
|
||||||
- build_ubuntu_ssltests
|
- build_ubuntu_ssltests
|
||||||
- build_wasi
|
- build_wasi
|
||||||
|
@ -632,7 +642,6 @@ jobs:
|
||||||
&& '
|
&& '
|
||||||
check_generated_files,
|
check_generated_files,
|
||||||
build_macos,
|
build_macos,
|
||||||
build_macos_free_threading,
|
|
||||||
build_ubuntu,
|
build_ubuntu,
|
||||||
build_ubuntu_ssltests,
|
build_ubuntu_ssltests,
|
||||||
build_wasi,
|
build_wasi,
|
||||||
|
|
|
@ -8,13 +8,14 @@ on:
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
os-matrix:
|
os:
|
||||||
required: false
|
description: OS to run the job
|
||||||
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_macos:
|
build_macos:
|
||||||
name: build and test (${{ matrix.os }})
|
name: build and test (${{ inputs.os }})
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
env:
|
env:
|
||||||
HOMEBREW_NO_ANALYTICS: 1
|
HOMEBREW_NO_ANALYTICS: 1
|
||||||
|
@ -23,18 +24,7 @@ jobs:
|
||||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
||||||
PYTHONSTRICTEXTENSIONBUILD: 1
|
PYTHONSTRICTEXTENSIONBUILD: 1
|
||||||
TERM: linux
|
TERM: linux
|
||||||
strategy:
|
runs-on: ${{ inputs.os }}
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: ${{fromJson(inputs.os-matrix)}}
|
|
||||||
is-fork:
|
|
||||||
- ${{ github.repository_owner != 'python' }}
|
|
||||||
exclude:
|
|
||||||
- os: "ghcr.io/cirruslabs/macos-runner:sonoma"
|
|
||||||
is-fork: true
|
|
||||||
- os: "macos-14"
|
|
||||||
is-fork: false
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Runner image version
|
- name: Runner image version
|
||||||
|
@ -43,7 +33,7 @@ jobs:
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: config.cache
|
path: config.cache
|
||||||
key: ${{ github.job }}-${{ matrix.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
|
key: ${{ github.job }}-${{ inputs.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
|
||||||
- name: Install Homebrew dependencies
|
- name: Install Homebrew dependencies
|
||||||
run: brew install pkg-config openssl@3.0 xz gdbm tcl-tk
|
run: brew install pkg-config openssl@3.0 xz gdbm tcl-tk
|
||||||
- name: Configure CPython
|
- name: Configure CPython
|
||||||
|
|
Loading…
Reference in New Issue