From a40f694bb57d25ce433eb3bd0335222f68797104 Mon Sep 17 00:00:00 2001 From: Finagolfin Date: Thu, 4 Dec 2025 20:11:00 +0530 Subject: [PATCH] Start building the 6.3 devel snapshots on the CI --- .github/workflows/sdks.yml | 14 +++++++------- README.md | 2 +- get-packages-and-swift-source.swift | 18 ++++++++---------- ...unk.patch => swift-android-ci-release.patch | 0 ...-trunk.patch => swift-android-release.patch | 0 ...nk-spawn.patch => swift-android-spawn.patch | 0 6 files changed, 16 insertions(+), 18 deletions(-) rename swift-android-ci-except-trunk.patch => swift-android-ci-release.patch (100%) rename swift-android-except-trunk.patch => swift-android-release.patch (100%) rename swift-android-trunk-spawn.patch => swift-android-spawn.patch (100%) diff --git a/.github/workflows/sdks.yml b/.github/workflows/sdks.yml index 032111a7..853197b0 100644 --- a/.github/workflows/sdks.yml +++ b/.github/workflows/sdks.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - version: [release, devel, trunk] + version: [devel] #, trunk] os: [ubuntu-24.04, macos-15-intel] env: ANDROID_API_LEVEL: 24 @@ -24,8 +24,8 @@ jobs: LATEST_TOOLCHAIN_VERSION=$(curl -sL https://github.com/apple/swift/releases | grep -m1 swift-6.2 | cut -d- -f2) SWIFT_TAG="swift-${LATEST_TOOLCHAIN_VERSION}-RELEASE" elif [ ${{ matrix.version }} = 'devel' ]; then - LATEST_TOOLCHAIN_VERSION=$(curl -sL https://github.com/apple/swift/tags | grep -m1 swift-6.2-DEV | cut -d- -f8-10) - SWIFT_TAG="swift-6.2-DEVELOPMENT-SNAPSHOT-${LATEST_TOOLCHAIN_VERSION}-a" + LATEST_TOOLCHAIN_VERSION=$(curl -sL https://github.com/apple/swift/tags | grep -m1 swift-6.3-DEV | cut -d- -f8-10) + SWIFT_TAG="swift-6.3-DEVELOPMENT-SNAPSHOT-${LATEST_TOOLCHAIN_VERSION}-a" else LATEST_TOOLCHAIN_VERSION=$(curl -sL https://github.com/apple/swift/tags | grep -m1 swift-DEV | cut -d- -f7-9) SWIFT_TAG="swift-DEVELOPMENT-SNAPSHOT-${LATEST_TOOLCHAIN_VERSION}-a" @@ -128,11 +128,11 @@ jobs: git apply -C1 swift-android.patch swift-android-ci.patch BUILD_FLAG="--foundation-cmake-options=-DCMAKE_SHARED_LINKER_FLAGS=''" - if ${{ matrix.version == 'trunk' }}; then - git apply swift-android-trunk-spawn.patch - BUILD_FLAG+=" --libdispatch-cmake-options=-DCMAKE_SHARED_LINKER_FLAGS=''" + if ${{ matrix.version == 'release' }}; then + git apply swift-android-ci-release.patch swift-android-release.patch else - git apply swift-android-ci-except-trunk.patch swift-android-except-trunk.patch + git apply swift-android-spawn.patch + BUILD_FLAG+=" --libdispatch-cmake-options=-DCMAKE_SHARED_LINKER_FLAGS=''" fi perl -pi -e 's%33%24%' $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/execinfo.h diff --git a/README.md b/README.md index bd59d957..8b438586 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ Next, apply two patches from this repo to the Swift source, which make modifications for NDK 27 and [the Foundation rewrite in Swift 6 that was merged last summer](https://www.swift.org/blog/foundation-preview-now-available/): ``` -git apply swift-android.patch swift-android-except-trunk.patch +git apply swift-android.patch swift-android-release.patch ``` After making sure [needed build tools like python 3, CMake, and ninja](https://github.com/swiftlang/swift/blob/release/6.2/docs/HowToGuides/GettingStarted.md#linux) diff --git a/get-packages-and-swift-source.swift b/get-packages-and-swift-source.swift index 0699bd00..8f784402 100644 --- a/get-packages-and-swift-source.swift +++ b/get-packages-and-swift-source.swift @@ -17,9 +17,9 @@ let extraSwiftRepos = ["swift-llbuild", "swift-package-manager", "swift-driver", "swift-certificates", "swift-asn1", "swift-toolchain-sqlite", "swift-build"] let appleRepos = ["swift-argument-parser", "swift-crypto", "swift-system", "swift-collections", "swift-certificates", "swift-asn1"] let renameRepos = ["swift-llbuild" : "llbuild", "swift-package-manager" : "swiftpm"] -var repoTags = ["swift-system" : "1.5.0", "swift-collections" : "1.1.3", "swift-asn1" : "1.0.0", - "swift-certificates" : "1.0.1", "swift-argument-parser" : "1.4.0", - "swift-crypto" : "3.0.0", "swift-toolchain-sqlite" : "1.0.1"] +var repoTags = ["swift-system" : "1.5.0", "swift-collections" : "1.1.6", "swift-asn1" : "1.3.2", + "swift-certificates" : "1.10.1", "swift-argument-parser" : "1.5.1", + "swift-crypto" : "3.12.5", "swift-toolchain-sqlite" : "1.0.1"] if ProcessInfo.processInfo.environment["BUILD_SWIFT_PM"] != nil { swiftRepos += extraSwiftRepos termuxPackages += ["ncurses", "libsqlite"] @@ -55,15 +55,13 @@ if tagExtract.numberOfMatches(in: SWIFT_TAG, range: tagRange) == 1 { if swiftBranch == "RELEASE" { sdkDir = "swift-release-android-\(ANDROID_ARCH)-24-sdk" + repoTags["swift-collections"] = "1.1.3" + repoTags["swift-argument-parser"] = "1.4.0" + repoTags["swift-crypto"] = "3.0.0" + repoTags["swift-certificates"] = "1.0.1" + repoTags["swift-asn1"] = "1.0.0" } else { sdkDir = "swift-\(swiftVersion == "" ? "trunk" : "devel")-android-\(ANDROID_ARCH)-\(swiftSnapshotDate)-24-sdk" - if swiftVersion == "" { - repoTags["swift-collections"] = "1.1.6" - repoTags["swift-argument-parser"] = "1.5.1" - repoTags["swift-crypto"] = "3.12.5" - repoTags["swift-certificates"] = "1.10.1" - repoTags["swift-asn1"] = "1.3.2" - } } // takes the name of a command-line executable and the arguments to pass to it diff --git a/swift-android-ci-except-trunk.patch b/swift-android-ci-release.patch similarity index 100% rename from swift-android-ci-except-trunk.patch rename to swift-android-ci-release.patch diff --git a/swift-android-except-trunk.patch b/swift-android-release.patch similarity index 100% rename from swift-android-except-trunk.patch rename to swift-android-release.patch diff --git a/swift-android-trunk-spawn.patch b/swift-android-spawn.patch similarity index 100% rename from swift-android-trunk-spawn.patch rename to swift-android-spawn.patch