3535 type : string
3636 description : " CPython release number (ie '3.11.5', note without the 'v' prefix)"
3737
38- name : " Build Python source and docs artifacts"
38+ name : " Build release artifacts"
3939
4040permissions : {}
4141
4242# Set from inputs for workflow_dispatch, or set defaults to test push/PR events
4343env :
4444 GIT_REMOTE : ${{ github.event.inputs.git_remote || 'python' }}
45- GIT_COMMIT : ${{ github.event.inputs.git_commit || '4f8bb3947cfbc20f970ff9d9531e1132a9e95396 ' }}
46- CPYTHON_RELEASE : ${{ github.event.inputs.cpython_release || '3.13.2 ' }}
45+ GIT_COMMIT : ${{ github.event.inputs.git_commit || '31967d8de3d27889dd1819b8dccc2bdc17c030c1 ' }}
46+ CPYTHON_RELEASE : ${{ github.event.inputs.cpython_release || '3.14.0rc2 ' }}
4747
4848jobs :
4949 verify-input :
5050 runs-on : ubuntu-24.04
51+ timeout-minutes : 5
5152 outputs :
52- # Needed because env vars are not available in the build-docs check below
53- cpython_release : ${{ env.CPYTHON_RELEASE }}
53+ build-docs : ${{ steps.select-jobs.outputs.docs }}
54+ build-android : ${{ steps.select-jobs.outputs.android }}
5455 steps :
5556 - name : " Workflow run information"
5657 run : |
5758 echo "git_remote: $GIT_REMOTE"
5859 echo "git_commit: $GIT_COMMIT"
5960 echo "cpython_release: $CPYTHON_RELEASE"
6061
62+ - name : " Checkout python/release-tools"
63+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
64+ with :
65+ persist-credentials : false
66+
6167 - name : " Checkout ${{ env.GIT_REMOTE }}/cpython"
62- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
68+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6369 with :
6470 persist-credentials : false
6571 repository : " ${{ env.GIT_REMOTE }}/cpython"
@@ -73,18 +79,29 @@ jobs:
7379 exit 1
7480 fi
7581
82+ - name : " Setup Python"
83+ uses : actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
84+ with :
85+ python-version : 3.12
86+
87+ - name : " Select jobs"
88+ id : select-jobs
89+ run : |
90+ ./select_jobs.py "$CPYTHON_RELEASE" | tee -a "$GITHUB_OUTPUT"
91+
7692 build-source :
7793 runs-on : ubuntu-24.04
94+ timeout-minutes : 15
7895 needs :
7996 - verify-input
8097 steps :
8198 - name : " Checkout python/release-tools"
82- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
83100 with :
84101 persist-credentials : false
85102
86103 - name : " Checkout ${{ env.GIT_REMOTE }}/cpython"
87- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
104+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
88105 with :
89106 persist-credentials : false
90107 repository : " ${{ env.GIT_REMOTE }}/cpython"
@@ -115,14 +132,13 @@ jobs:
115132
116133 build-docs :
117134 runs-on : ubuntu-24.04
135+ timeout-minutes : 45
118136 needs :
119137 - verify-input
120-
121- # Docs aren't built for alpha or beta releases.
122- if : (!(contains(needs.verify-input.outputs.cpython_release, 'a') || contains(needs.verify-input.outputs.cpython_release, 'b')))
138+ if : fromJSON(needs.verify-input.outputs.build-docs)
123139 steps :
124140 - name : " Checkout ${{ env.GIT_REMOTE }}/cpython"
125- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
141+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
126142 with :
127143 persist-credentials : false
128144 repository : " ${{ env.GIT_REMOTE }}/cpython"
@@ -135,14 +151,19 @@ jobs:
135151
136152 - name : " Install docs dependencies"
137153 run : |
138- python -m pip install \
139- -r Doc/requirements.txt
140-
154+ python -m pip install -r Doc/requirements.txt
141155 sudo apt-get update
142156 sudo apt-get install --yes --no-install-recommends \
143- latexmk texlive-xetex xindy texinfo texlive-latex-base \
144- texlive-fonts-recommended texlive-fonts-extra \
145- texlive-full
157+ fonts-freefont-otf \
158+ latexmk \
159+ texinfo \
160+ texlive-fonts-extra \
161+ texlive-fonts-recommended \
162+ texlive-latex-base \
163+ texlive-latex-extra \
164+ texlive-latex-recommended \
165+ texlive-xetex \
166+ xindy
146167
147168 - name : " Build docs"
148169 run : |
@@ -158,11 +179,12 @@ jobs:
158179
159180 test-source :
160181 runs-on : ubuntu-24.04
182+ timeout-minutes : 60
161183 needs :
162184 - build-source
163185 steps :
164186 - name : " Download the source artifacts"
165- uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3 .0
187+ uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0 .0
166188 with :
167189 name : source
168190
@@ -180,3 +202,38 @@ jobs:
180202
181203 cd ../installation
182204 ./bin/python3 -m test -uall
205+
206+ build-android :
207+ name : build-android (${{ matrix.arch }})
208+ needs :
209+ - verify-input
210+ if : fromJSON(needs.verify-input.outputs.build-android)
211+
212+ strategy :
213+ matrix :
214+ include :
215+ - arch : aarch64
216+ runs-on : macos-15
217+ - arch : x86_64
218+ runs-on : ubuntu-24.04
219+
220+ runs-on : ${{ matrix.runs-on }}
221+ timeout-minutes : 60
222+ env :
223+ triplet : ${{ matrix.arch }}-linux-android
224+ steps :
225+ - name : " Checkout ${{ env.GIT_REMOTE }}/cpython"
226+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
227+ with :
228+ persist-credentials : false
229+ repository : " ${{ env.GIT_REMOTE }}/cpython"
230+ ref : " v${{ env.CPYTHON_RELEASE }}"
231+
232+ - name : Build and test
233+ run : ./Android/android.py ci "$triplet"
234+
235+ - uses : actions/upload-artifact@v4
236+ with :
237+ name : ${{ env.triplet }}
238+ path : cross-build/${{ env.triplet }}/dist/*
239+ if-no-files-found : error
0 commit comments