Skip to content

Commit a95a88d

Browse files
committed
Build Android artifacts with a reusable workflow
This is a follow up for python#265 that added initial implementation with copy-pasted steps.
1 parent 1f15dab commit a95a88d

File tree

1 file changed

+14
-21
lines changed

1 file changed

+14
-21
lines changed

.github/workflows/build-release.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
runs-on: ubuntu-24.04
5151
timeout-minutes: 5
5252
outputs:
53+
checkout-ref: v${{ env.CPYTHON_RELEASE }}
54+
checkout-repository: ${{ env.GIT_REMOTE }}/cpython
5355
build-docs: ${{ steps.select-jobs.outputs.docs }}
5456
build-android: ${{ steps.select-jobs.outputs.android }}
5557
steps:
@@ -204,7 +206,8 @@ jobs:
204206
./bin/python3 -m test -uall
205207
206208
build-android:
207-
name: build-android (${{ matrix.arch }})
209+
# ${{ '' } is a hack to nest jobs under the same sidebar category.
210+
name: Android${{ '' }} # zizmor: ignore[obfuscation]
208211
needs:
209212
- verify-input
210213
if: fromJSON(needs.verify-input.outputs.build-android)
@@ -217,23 +220,13 @@ jobs:
217220
- arch: x86_64
218221
runs-on: ubuntu-24.04
219222

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
223+
# FIXME: point to python/cpython once tested
224+
uses: webknjaz/cpython/.github/workflows/reusable-android.yml@29fe94de87e4d970127c6ad79928e79302a214a3
225+
with:
226+
arch: ${{ matrix.arch }}
227+
check-name: ${{ matrix.arch }}
228+
checkout-ref: ${{ needs.verify-input.outputs.checkout-ref }}
229+
checkout-repository: ${{ needs.verify-input.outputs.checkout-repository }}
230+
runner-vm-os: ${{ matrix.runs-on }}
231+
store-built-artifacts: true
232+
timeout-minutes: 60

0 commit comments

Comments
 (0)