-
-
Notifications
You must be signed in to change notification settings - Fork 38
Add Android support #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add Android support #265
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the current state of python/cpython#137186, this makes sense to me
(Updated from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's set the defaults to a 3.14 commit, so we test Android for regular PRs and don't break it by mistake:
# Set from inputs for workflow_dispatch, or set defaults to test push/PR events
env:
GIT_REMOTE: ${{ github.event.inputs.git_remote || 'python' }}
GIT_COMMIT: ${{ github.event.inputs.git_commit || '48f88310044c6ef877f3b0761cf7afece2f8fb3a' }}
CPYTHON_RELEASE: ${{ github.event.inputs.cpython_release || '3.14.0rc1' }}
.github/workflows/build-release.yml
Outdated
repository: "${{ env.GIT_REMOTE }}/cpython" | ||
ref: "v${{ env.CPYTHON_RELEASE }}" | ||
|
||
- uses: ./.github/actions/build-android |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: pending merge of python/cpython#137186, let's set this as a draft for now.
I agree, but that'll have to wait until there's a a tag that includes the Android build action from python/cpython#137186. |
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
python/cpython#137186 has been changed to use an |
I've updated I've also created python/peps#4541 to make the corresponding changes to PEP 101. Pending the merge of python/cpython#137186, I think this PR is now complete. |
.github/workflows/build-release.yml
Outdated
timeout-minutes: 60 | ||
strategy: | ||
matrix: | ||
arch: [aarch64, x86_64] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arch: [aarch64, x86_64] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
.github/workflows/build-release.yml
Outdated
if: | | ||
!( | ||
startsWith(needs.verify-input.outputs.cpython_release, '3.9.') || | ||
startsWith(needs.verify-input.outputs.cpython_release, '3.10.') || | ||
startsWith(needs.verify-input.outputs.cpython_release, '3.11.') || | ||
startsWith(needs.verify-input.outputs.cpython_release, '3.12.') || | ||
startsWith(needs.verify-input.outputs.cpython_release, '3.13.') | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest computing another boolean output within verify-input
similar to how build-context
functions in python/cpython
, which would help consolidate the decision logic closer to other checks.
And the use would look as follows:
if: | | |
!( | |
startsWith(needs.verify-input.outputs.cpython_release, '3.9.') || | |
startsWith(needs.verify-input.outputs.cpython_release, '3.10.') || | |
startsWith(needs.verify-input.outputs.cpython_release, '3.11.') || | |
startsWith(needs.verify-input.outputs.cpython_release, '3.12.') || | |
startsWith(needs.verify-input.outputs.cpython_release, '3.13.') | |
) | |
if: fromJSON(needs.verify-input.outputs.build-android) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. The "Fix typo" commit now demonstrates a run which builds Android but not docs, while the most recent "Revert to previous inputs" commit demonstrates the opposite. The other combinations are all covered by a unit test.
See the linked issue for details:
Since there will be no Android releases for Python 3.13 and earlier, the Android release job is skipped on those versions. See the "Temporarily point inputs ..." commit for a run that includes Android.
The lint and docs failures appear to be unrelated.