mirror of
https://github.com/pyenv/pyenv.git
synced 2026-09-10 15:46:17 -04:00
CI: test on all runners when the build logic changes
Co-Authored-By: Ivan Pozdeev <vano@mail.mipt.ru>
This commit is contained in:
parent
ecf9a7f9e6
commit
97900a4aa4
3
.github/actions/build-python/action.yml
vendored
3
.github/actions/build-python/action.yml
vendored
|
|
@ -1,8 +1,7 @@
|
|||
name: Build a Python version
|
||||
description: >
|
||||
Install python-build's system dependencies for the current runner's OS, build
|
||||
the requested version from source with `pyenv install`, and check that the
|
||||
interpreter that comes out is the one that was asked for.
|
||||
and check the requested version.
|
||||
inputs:
|
||||
python-version:
|
||||
description: A version as accepted by `pyenv install`.
|
||||
|
|
|
|||
45
.github/workflows/build.yml
vendored
45
.github/workflows/build.yml
vendored
|
|
@ -8,20 +8,45 @@ permissions:
|
|||
contents: read
|
||||
|
||||
jobs:
|
||||
discover_build_logic_change:
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-slim
|
||||
env:
|
||||
FULL_OS_MATRIX: '[
|
||||
"macos-14",
|
||||
"macos-15",
|
||||
"macos-15-intel",
|
||||
"macos-26",
|
||||
"macos-26-intel",
|
||||
"ubuntu-22.04",
|
||||
"ubuntu-22.04-arm",
|
||||
"ubuntu-24.04",
|
||||
"ubuntu-24.04-arm"
|
||||
]'
|
||||
outputs:
|
||||
os: ${{ steps.detect.outputs.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- run: git fetch origin "$GITHUB_BASE_REF"
|
||||
- id: detect
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ -n $(git diff --name-only "origin/$GITHUB_BASE_REF" -- \
|
||||
plugins/python-build/bin/python-build \
|
||||
.github/actions/build-python/action.yml \
|
||||
.github/workflows/build.yml) ]]
|
||||
then
|
||||
printf "%s\n" "os<<!" "$FULL_OS_MATRIX" "!" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
build:
|
||||
needs: discover_build_logic_change
|
||||
# Run when the detection job succeeded *or was skipped* -- but not failed
|
||||
if: ${{ !cancelled() && !failure() }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- macos-14
|
||||
- macos-15
|
||||
- macos-15-intel
|
||||
- macos-26
|
||||
- macos-26-intel
|
||||
- ubuntu-22.04
|
||||
- ubuntu-22.04-arm
|
||||
- ubuntu-24.04
|
||||
- ubuntu-24.04-arm
|
||||
os: ${{ fromJson(needs.discover_build_logic_change.outputs.os || '["macos-latest","ubuntu-latest"]') }}
|
||||
python-version:
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
|
|
|
|||
Loading…
Reference in a new issue