Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on:
type: string
description: "CPython release number (ie '3.11.5', note without the 'v' prefix)"

name: "Build Python source and docs artifacts"
name: "Build release artifacts"

permissions: {}

Expand All @@ -50,15 +50,20 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
# Needed because env vars are not available in the build-docs check below
cpython_release: ${{ env.CPYTHON_RELEASE }}
build-docs: ${{ steps.select-jobs.outputs.docs }}
build-android: ${{ steps.select-jobs.outputs.android }}
steps:
- name: "Workflow run information"
run: |
echo "git_remote: $GIT_REMOTE"
echo "git_commit: $GIT_COMMIT"
echo "cpython_release: $CPYTHON_RELEASE"

- name: "Checkout python/release-tools"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: "Checkout ${{ env.GIT_REMOTE }}/cpython"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand All @@ -74,6 +79,16 @@ jobs:
exit 1
fi

- name: "Setup Python"
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.12

- name: "Select jobs"
id: select-jobs
run: |
./select_jobs.py "$CPYTHON_RELEASE" | tee -a "$GITHUB_OUTPUT"

build-source:
runs-on: ubuntu-24.04
timeout-minutes: 15
Expand Down Expand Up @@ -120,9 +135,7 @@ jobs:
timeout-minutes: 45
needs:
- verify-input

# Docs aren't built for alpha or beta releases.
if: (!(contains(needs.verify-input.outputs.cpython_release, 'a') || contains(needs.verify-input.outputs.cpython_release, 'b')))
if: fromJSON(needs.verify-input.outputs.build-docs)
steps:
- name: "Checkout ${{ env.GIT_REMOTE }}/cpython"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -189,3 +202,38 @@ jobs:

cd ../installation
./bin/python3 -m test -uall

build-android:
name: build-android (${{ matrix.arch }})
needs:
- verify-input
if: fromJSON(needs.verify-input.outputs.build-android)

strategy:
matrix:
include:
- arch: aarch64
runs-on: macos-15
- arch: x86_64
runs-on: ubuntu-24.04

runs-on: ${{ matrix.runs-on }}
timeout-minutes: 60
env:
triplet: ${{ matrix.arch }}-linux-android
steps:
- name: "Checkout ${{ env.GIT_REMOTE }}/cpython"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
repository: "${{ env.GIT_REMOTE }}/cpython"
ref: "v${{ env.CPYTHON_RELEASE }}"

- name: Build and test
run: ./Android/android.py ci "$triplet"

- uses: actions/upload-artifact@v4
with:
name: ${{ env.triplet }}
path: cross-build/${{ env.triplet }}/dist/*
if-no-files-found: error
Loading
Loading