Skip to content

Commit

Permalink
Start building and testing the new Swift 6.1 development branch on th…
Browse files Browse the repository at this point in the history
…e CI
  • Loading branch information
finagolfin committed Nov 20, 2024
1 parent a11556d commit 7fef692
Show file tree
Hide file tree
Showing 8 changed files with 255 additions and 353 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
SWIFT_TAG="swift-${LATEST_TOOLCHAIN_VERSION}-RELEASE"
echo "release-tag=$SWIFT_TAG" >> $GITHUB_OUTPUT
elif [ ${{ matrix.version }} = 'devel' ]; then
LATEST_TOOLCHAIN_VERSION=$(curl -sL https://github.com/apple/swift/tags | grep -m1 swift-6.0-DEV | cut -d- -f8-10)
SWIFT_TAG="swift-6.0-DEVELOPMENT-SNAPSHOT-${LATEST_TOOLCHAIN_VERSION}-a"
LATEST_TOOLCHAIN_VERSION=$(curl -sL https://github.com/apple/swift/tags | grep -m1 swift-6.1-DEV | cut -d- -f8-10)
SWIFT_TAG="swift-6.1-DEVELOPMENT-SNAPSHOT-${LATEST_TOOLCHAIN_VERSION}-a"
echo "devel-tag=$SWIFT_TAG" >> $GITHUB_OUTPUT
else
LATEST_TOOLCHAIN_VERSION=$(curl -sL https://github.com/apple/swift/tags | grep -m1 swift-DEV | cut -d- -f7-9)
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
if [ ${{ matrix.version }} = 'release' ]; then
SWIFT_BRANCH="swift-$(echo ${{ steps.check.outputs.release-tag }} | cut -d- -f2)-release"
elif [ ${{ matrix.version }} = 'devel' ]; then
SWIFT_BRANCH="swift-6.0-branch"
SWIFT_BRANCH="swift-6.1-branch"
echo "devel-updated=true" >> $GITHUB_OUTPUT
else
SWIFT_BRANCH="development"
Expand Down Expand Up @@ -135,9 +135,9 @@ jobs:
TAG="${{ needs.get-latest-toolchain.outputs.trunk-version }}"
fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
KEY="$TAG-${{ matrix.arch }}-ndk-${NDK_VERSION}-cxx-sdk"
KEY="$TAG-${{ matrix.arch }}-ndk-${NDK_VERSION}-branch-sdk"
echo "arch-key=$KEY" >> $GITHUB_OUTPUT
echo "key=$TAG-ndk-${NDK_VERSION}-cxx-bundle" >> $GITHUB_OUTPUT
echo "key=$TAG-ndk-${NDK_VERSION}-branch-bundle" >> $GITHUB_OUTPUT
if ${{ matrix.arch == 'x86_64' }}; then
echo "aarch64-key=${KEY/x86_64/aarch64}" >> $GITHUB_OUTPUT
echo "arm-key=${KEY/x86_64/armv7}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -209,16 +209,10 @@ jobs:
SDK=`pwd`/$SDK_NAME
git apply swift-android.patch swift-android-foundation.patch swift-android-ci.patch swift-crypto.patch swift-system.patch
if [ ${{ matrix.version }} = 'trunk' ]; then
git apply swift-android-ci-trunk.patch swift-android-foundation-trunk.patch
if [ ${{ matrix.version }} = 'release' ]; then
git apply swift-android-ci-release.patch swift-android-foundation-release.patch
else
git apply swift-android-ci-except-trunk.patch swift-android-foundation-except-trunk.patch
git apply -C1 swift-android-foundation-armv7-except-trunk.patch
if [ ${{ matrix.version }} = 'devel' ]; then
perl -pi -e 's%Musl%Bionic%g' swift-corelibs-foundation/Sources/Testing/Testing.swift
else
git apply swift-android-foundation-release.patch
fi
git apply swift-android-ci-except-release.patch swift-android-foundation-except-release.patch
fi
perl -pi -e 's%r26%ndk/27%' swift/stdlib/cmake/modules/AddSwiftStdlib.cmake
Expand Down Expand Up @@ -298,7 +292,7 @@ jobs:
${TOOLCHAIN}/bin/swift sdk configure --show-configuration ${{ steps.version.outputs.tag }}-android-${ANDROID_API_LEVEL}-${BUNDLE_VERSION} $ARCH_TARGET
FLAGS="--swift-sdk ${ARCH_TARGET}"
fi
if ${{ matrix.version == 'trunk' }}; then
if ${{ matrix.version != 'release' }}; then
FLAGS+=" -Xswiftc -disallow-use-new-driver"
else
FLAGS+=" -Xswiftc -Xclang-linker -Xswiftc -fuse-ld=lld"
Expand Down
10 changes: 4 additions & 6 deletions get-packages-and-swift-source.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ let extraSwiftRepos = ["swift-llbuild", "swift-package-manager", "swift-driver",
"swift-certificates", "swift-asn1", "swift-toolchain-sqlite"]
let appleRepos = ["swift-argument-parser", "swift-crypto", "swift-system", "swift-collections", "swift-certificates", "swift-asn1"]
let renameRepos = ["swift-llbuild" : "llbuild", "swift-package-manager" : "swiftpm", "Yams" : "yams"]
var repoTags = ["swift-system" : "1.3.0", "swift-collections" : "1.1.2", "swift-asn1" : "1.0.0",
"swift-certificates" : "1.0.1", "Yams" : "5.0.6", "swift-argument-parser" : "1.2.3",
var repoTags = ["swift-system" : "1.3.0", "swift-collections" : "1.1.3", "swift-asn1" : "1.0.0",
"swift-certificates" : "1.0.1", "Yams" : "5.0.6", "swift-argument-parser" : "1.4.0",
"swift-crypto" : "3.0.0", "swift-toolchain-sqlite" : "1.0.1"]
if ProcessInfo.processInfo.environment["BUILD_SWIFT_PM"] != nil {
termuxPackages += ["ncurses", "libsqlite"]
Expand Down Expand Up @@ -52,12 +52,10 @@ if tagExtract.numberOfMatches(in: SWIFT_TAG, range: tagRange) == 1 {
}

if swiftBranch == "RELEASE" {
repoTags["swift-argument-parser"] = "1.2.3"
repoTags["swift-collections"] = "1.1.2"
sdkDir = "swift-release-android-\(ANDROID_ARCH)-24-sdk"
} else {
if swiftVersion == "" {
repoTags["swift-argument-parser"] = "1.4.0"
repoTags["swift-collections"] = "1.1.3"
}
sdkDir = "swift-\(swiftVersion == "" ? "trunk" : "devel")-android-\(ANDROID_ARCH)-\(swiftSnapshotDate)-24-sdk"
}

Expand Down
File renamed without changes.
File renamed without changes.
168 changes: 0 additions & 168 deletions swift-android-foundation-armv7-except-trunk.patch

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 7fef692

Please sign in to comment.