mirror of
https://github.com/python/cpython.git
synced 2024-11-28 08:20:55 +01:00
fd104dfcb8
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
on:
|
|
workflow_call:
|
|
inputs:
|
|
config_hash:
|
|
required: true
|
|
type: string
|
|
free-threading:
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
os-matrix:
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
build_macos:
|
|
name: build and test (${{ matrix.os }})
|
|
timeout-minutes: 60
|
|
env:
|
|
HOMEBREW_NO_ANALYTICS: 1
|
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
|
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
|
PYTHONSTRICTEXTENSIONBUILD: 1
|
|
TERM: linux
|
|
strategy:
|
|
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:
|
|
- uses: actions/checkout@v4
|
|
- name: Runner image version
|
|
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
|
|
- name: Restore config.cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: config.cache
|
|
key: ${{ github.job }}-${{ matrix.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
|
|
- name: Install Homebrew dependencies
|
|
run: brew install pkg-config openssl@3.0 xz gdbm tcl-tk
|
|
- name: Configure CPython
|
|
run: |
|
|
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
|
|
GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \
|
|
./configure \
|
|
--config-cache \
|
|
--with-pydebug \
|
|
${{ inputs.free-threading && '--disable-gil' || '' }} \
|
|
--prefix=/opt/python-dev \
|
|
--with-openssl="$(brew --prefix openssl@3.0)"
|
|
- name: Build CPython
|
|
run: make -j8
|
|
- name: Display build info
|
|
run: make pythoninfo
|
|
- name: Tests
|
|
run: make test
|