Skip to content
Open
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
37 changes: 36 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
outputs:
build-docs: ${{ steps.select-jobs.outputs.docs }}
build-android: ${{ steps.select-jobs.outputs.android }}
build-ios: ${{ steps.select-jobs.outputs.ios }}
steps:
- name: "Workflow run information"
run: |
Expand Down Expand Up @@ -260,11 +261,45 @@ jobs:
repository: "${{ env.GIT_REMOTE }}/cpython"
ref: "v${{ env.CPYTHON_RELEASE }}"

# Python 3.15 moved the build tools to the Platforms directory. Add a
# compatibility shim to simplify execution. Can be removed when 3.14
# reaches EOL
- name: Set up compatibility symlink
run: |
if [ ! -e Platforms/Android ]; then
mkdir -p Platforms
ln -s ../Android Platforms/Android
ln -s ./android.py Android/__main__.py
fi

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

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

build-ios:
name: build-iOS
needs:
- verify-input
if: fromJSON(needs.verify-input.outputs.build-ios)
runs-on: macos-14
timeout-minutes: 60
steps:
- name: "Checkout ${{ env.GIT_REMOTE }}/cpython"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: "${{ env.GIT_REMOTE }}/cpython"
ref: "v${{ env.CPYTHON_RELEASE }}"

- name: Build and test
run: python3 Platforms/Apple build ci --slow-ci

- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
path: cross-build/dist/*
if-no-files-found: error
8 changes: 6 additions & 2 deletions add_to_pydotorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,17 @@ def get_file_descriptions(
),
),
(
rx(r"aarch64-linux-android.tar.gz$"),
rx(r"-aarch64-linux-android.tar.gz$"),
("Android embeddable package (aarch64)", "android", False, ""),
),
(
rx(r"x86_64-linux-android.tar.gz$"),
rx(r"-x86_64-linux-android.tar.gz$"),
("Android embeddable package (x86_64)", "android", False, ""),
),
(
rx(r"-iOS-XCframework.tar.gz$"),
("iOS XCframework", "ios", False, ""),
),
]


Expand Down
3 changes: 3 additions & 0 deletions select_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def main() -> None:
# Android binary releases began in Python 3.14.
output("android", version.as_tuple() >= (3, 14))

# iOS binary releases began in Python 3.15.
output("ios", version.as_tuple() >= (3, 15))


if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions tests/fake-ftp-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ python-3.14.0b2t-amd64.zip
python-3.14.0b2t-arm64.zip
python-3.14.0b2t-win32.zip
python-3.14.0b3-aarch64-linux-android.tar.gz
Python-3.14.0b3-iOS-XCframework.tar.gz
python-3.14.0b3-amd64.exe
python-3.14.0b3-amd64.exe.crt
python-3.14.0b3-amd64.exe.sig
Expand Down
7 changes: 7 additions & 0 deletions tests/test_add_to_pydotorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ def test_list_files(fs: FakeFilesystem) -> None:

# Assert
assert files == [
(
"Python-3.14.0b3-iOS-XCframework.tar.gz",
"iOS XCframework",
"ios",
False,
"",
),
("Python-3.14.0b3.tar.xz", "XZ compressed source tarball", "source", True, ""),
("Python-3.14.0b3.tgz", "Gzipped source tarball", "source", False, ""),
(
Expand Down
24 changes: 13 additions & 11 deletions tests/test_select_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@


@pytest.mark.parametrize(
("version", "docs", "android"),
("version", "docs", "android", "ios"),
[
("3.13.0a1", "false", "false"),
("3.13.0rc1", "true", "false"),
("3.13.0", "true", "false"),
("3.13.1", "true", "false"),
("3.14.0b2", "false", "true"),
("3.14.0rc1", "true", "true"),
("3.14.0", "true", "true"),
("3.14.1", "true", "true"),
("3.15.0a1", "false", "true"),
("3.15.0", "true", "true"),
("3.13.0a1", "false", "false", "false"),
("3.13.0rc1", "true", "false", "false"),
("3.13.0", "true", "false", "false"),
("3.13.1", "true", "false", "false"),
("3.14.0b2", "false", "true", "false"),
("3.14.0rc1", "true", "true", "false"),
("3.14.0", "true", "true", "false"),
("3.14.1", "true", "true", "false"),
("3.15.0a1", "false", "true", "true"),
("3.15.0", "true", "true", "true"),
],
)
def test_select_jobs(
version: str,
docs: str,
android: str,
ios: str,
monkeypatch: pytest.MonkeyPatch,
capsys: pytest.CaptureFixture[str],
) -> None:
Expand All @@ -34,5 +35,6 @@ def test_select_jobs(
f"""\
docs={docs}
android={android}
ios={ios}
"""
)
Loading