Skip to content

Commit dd189f8

Browse files
committed
Change BUILD_VERSION to BUILD_SCHEME and have it match release, swift-*-branch, or development
1 parent 4974e38 commit dd189f8

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

.github/workflows/pull_request.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
#arch: ['x86_64']
3636
# build both the quick (x86_64) and complete (aarch64,x86_64,armv7) SDKs
3737
#arch: ['x86_64', '']
38-
swift-version: ['release', 'devel', 'trunk']
38+
swift-version: ['release', 'swift-6.2-branch', 'development']
3939
runs-on: ubuntu-24.04
4040
steps:
4141
- name: Free Disk Space
@@ -52,7 +52,7 @@ jobs:
5252
run: |
5353
# these variabes are used by build-docker and build-local
5454
# to determine which Swift version to build for
55-
echo "BUILD_VERSION=${{ matrix.swift-version }}" >> $GITHUB_ENV
55+
echo "BUILD_SCHEME=${{ matrix.swift-version }}" >> $GITHUB_ENV
5656
echo "TARGET_ARCHS=${{ matrix.arch }}" >> $GITHUB_ENV
5757
echo "WORKDIR=${{ runner.temp }}/swift-android-sdk" >> $GITHUB_ENV
5858
- name: Checkout repository
@@ -62,12 +62,12 @@ jobs:
6262
working-directory: swift-ci/sdks/android
6363
run: |
6464
sudo apt install -q ninja-build patchelf
65-
./build-local ${BUILD_VERSION} ${WORKDIR}
65+
./build-local ${BUILD_SCHEME} ${WORKDIR}
6666
- name: Build Android SDK (Docker)
6767
if: ${{ matrix.build-type == 'docker' }}
6868
working-directory: swift-ci/sdks/android
6969
run: |
70-
./build-docker ${BUILD_VERSION} ${WORKDIR}
70+
./build-docker ${BUILD_SCHEME} ${WORKDIR}
7171
- name: Install Host Toolchain
7272
if: ${{ matrix.build-type == 'docker' }}
7373
working-directory: swift-ci/sdks/android

swift-ci/sdks/android/build-docker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ TARGET_ARCHS=${TARGET_ARCHS:-aarch64,x86_64,armv7}
1212
ANDROID_NDK_VERSION=android-ndk-r27c
1313
ANDROID_API=28
1414

15-
export BUILD_VERSION=${1}
15+
export BUILD_SCHEME=${1}
1616
# note that WORKDIR must not be under the current checkout or the patches will fail to apply
1717
WORKDIR=${2}
1818
if [[ "${WORKDIR}" == '' ]]; then

swift-ci/sdks/android/build-local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ TARGET_ARCHS=${TARGET_ARCHS:-aarch64,x86_64,armv7}
1212
ANDROID_NDK_VERSION=android-ndk-r27c
1313
ANDROID_API=28
1414

15-
export BUILD_VERSION=${1}
15+
export BUILD_SCHEME=${1}
1616
# note that WORKDIR must not be under the current checkout or the patches will fail to apply
1717
WORKDIR=${2}
1818
if [[ "${WORKDIR}" == '' ]]; then

swift-ci/sdks/android/scripts/patch-sources.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ perl -pi -e 's;dispatch android-execinfo;dispatch;g' $swift_android_patch
2828
perl -pi -e 's;call ln -sf;call ln -svf;g' $swift_android_patch
2929
perl -pi -e 's%linux-x86_64/sysroot/usr/lib"%linux-x86_64/sysroot/usr/lib"; echo "VALIDATING SYMBOLIC LINK"; ls -la "\${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib"; ls -la "\${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/swift"; %g' $swift_android_patch
3030

31-
case "${BUILD_VERSION}" in
31+
case "${BUILD_SCHEME}" in
3232
release)
3333
testing_patch="${patches_dir}/swift-android-testing-release.patch"
3434
;;
35-
devel)
35+
swift-*-branch)
3636
testing_patch="${patches_dir}/swift-android-testing-except-release.patch"
3737
;;
38-
trunk)
38+
development)
3939
testing_patch="${patches_dir}/swift-android-testing-except-release.patch"
4040
dispatch_patch="${patches_dir}/swift-android-trunk-libdispatch.patch"
4141
;;
4242
*)
43-
echo "$0: invalid BUILD_VERSION=${BUILD_VERSION}"
43+
echo "$0: invalid BUILD_SCHEME=${BUILD_SCHEME}"
4444
exit 1
4545
;;
4646
esac

swift-ci/sdks/android/scripts/toolchain-vars.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@
77
# ===----------------------------------------------------------------------===
88

99
# This script is meant to be sourced from another script that sets the
10-
# BUILD_VERSION environment variable to one of "release", "devel", or "trunk"
10+
# BUILD_SCHEME environment variable to one of "release", "swift-VERSION-branch", or "development"
1111
# and will set check the latest builds for each build type in order
1212
# to provide information about the Swift tag name in use and where to
1313
# obtain the latest toolchain for building.
1414

1515
OS=$(echo $HOST_OS | tr -d '.')
1616

17-
case "${BUILD_VERSION}" in
17+
case "${BUILD_SCHEME}" in
1818
release)
1919
# e.g., "swift-6.1-RELEASE"
2020
SWIFT_TAG=$(curl -fsSL https://www.swift.org/api/v1/install/releases.json | jq -r '.[-1].tag')
2121
# e.g., "swift-6.1-release"
2222
SWIFT_BRANCH=$(echo "${SWIFT_TAG}" | tr '[A-Z]' '[a-z]')
2323
;;
24-
devel)
24+
swift-*-branch)
2525
# e.g., swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-15-a
26-
SWIFT_TAG=$(curl -fsSL https://download.swift.org/swift-6.2-branch/$OS/latest-build.yml | grep '^dir: ' | cut -f 2 -d ' ')
27-
SWIFT_BRANCH="swift-$(echo $SWIFT_TAG | cut -d- -f2)-branch"
26+
SWIFT_TAG=$(curl -fsSL https://download.swift.org/$BUILD_SCHEME/$OS/latest-build.yml | grep '^dir: ' | cut -f 2 -d ' ')
27+
SWIFT_BRANCH=$BUILD_SCHEME
2828
;;
29-
trunk)
29+
development)
3030
# e.g., swift-DEVELOPMENT-SNAPSHOT-2025-05-14-a
3131
SWIFT_TAG=$(curl -fsSL https://download.swift.org/development/$OS/latest-build.yml | grep '^dir: ' | cut -f 2 -d ' ')
3232
SWIFT_BRANCH="development"
3333
;;
3434
*)
35-
echo "$0: invalid BUILD_VERSION=${BUILD_VERSION}"
35+
echo "$0: invalid BUILD_SCHEME=${BUILD_SCHEME}"
3636
exit 1
3737
;;
3838
esac

0 commit comments

Comments
 (0)