35
35
type : string
36
36
description : " CPython release number (ie '3.11.5', note without the 'v' prefix)"
37
37
38
- name : " Build Python source and docs artifacts"
38
+ name : " Build release artifacts"
39
39
40
40
permissions : {}
41
41
@@ -50,15 +50,20 @@ jobs:
50
50
runs-on : ubuntu-24.04
51
51
timeout-minutes : 5
52
52
outputs :
53
- # Needed because env vars are not available in the build-docs check below
54
- cpython_release : ${{ env.CPYTHON_RELEASE }}
53
+ build-docs : ${{ steps.select-jobs.outputs.docs }}
54
+ build-android : ${{ steps.select-jobs.outputs.android }}
55
55
steps :
56
56
- name : " Workflow run information"
57
57
run : |
58
58
echo "git_remote: $GIT_REMOTE"
59
59
echo "git_commit: $GIT_COMMIT"
60
60
echo "cpython_release: $CPYTHON_RELEASE"
61
61
62
+ - name : " Checkout python/release-tools"
63
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
64
+ with :
65
+ persist-credentials : false
66
+
62
67
- name : " Checkout ${{ env.GIT_REMOTE }}/cpython"
63
68
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
64
69
with :
74
79
exit 1
75
80
fi
76
81
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
+
77
92
build-source :
78
93
runs-on : ubuntu-24.04
79
94
timeout-minutes : 15
@@ -120,9 +135,7 @@ jobs:
120
135
timeout-minutes : 45
121
136
needs :
122
137
- verify-input
123
-
124
- # Docs aren't built for alpha or beta releases.
125
- 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)
126
139
steps :
127
140
- name : " Checkout ${{ env.GIT_REMOTE }}/cpython"
128
141
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -189,3 +202,38 @@ jobs:
189
202
190
203
cd ../installation
191
204
./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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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