mirror of
https://github.com/pyenv/pyenv.git
synced 2026-10-03 07:51:06 +09: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
|
name: Build a Python version
|
||||||
description: >
|
description: >
|
||||||
Install python-build's system dependencies for the current runner's OS, build
|
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
|
and check the requested version.
|
||||||
interpreter that comes out is the one that was asked for.
|
|
||||||
inputs:
|
inputs:
|
||||||
python-version:
|
python-version:
|
||||||
description: A version as accepted by `pyenv install`.
|
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
|
contents: read
|
||||||
|
|
||||||
jobs:
|
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:
|
build:
|
||||||
|
needs: discover_build_logic_change
|
||||||
|
# Run when the detection job succeeded *or was skipped* -- but not failed
|
||||||
|
if: ${{ !cancelled() && !failure() }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os: ${{ fromJson(needs.discover_build_logic_change.outputs.os || '["macos-latest","ubuntu-latest"]') }}
|
||||||
- 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
|
|
||||||
python-version:
|
python-version:
|
||||||
- "3.10"
|
- "3.10"
|
||||||
- "3.11"
|
- "3.11"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user