Skip to content

Commit 8c6f92c

Browse files
committed
Reduce Android API from 24 to 23
1 parent c30a475 commit 8c6f92c

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.github/workflows/pull_request.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
9595
ARTIFACT_PATH=$(realpath ${WORKDIR}/products/*.artifactbundle.tar.gz)
9696
echo "artifact-path=${ARTIFACT_PATH}" >> $GITHUB_OUTPUT
97-
echo "sdk-id=x86_64-unknown-linux-android24" >> $GITHUB_OUTPUT
97+
echo "sdk-id=x86_64-unknown-linux-android23" >> $GITHUB_OUTPUT
9898
9999
ARTIFACT_EXT=".artifactbundle.tar.gz"
100100
ARTIFACT_NAME="$(basename ${ARTIFACT_PATH} ${ARTIFACT_EXT})"
@@ -194,17 +194,17 @@ jobs:
194194
installed-sdk: ${{ steps.info.outputs.sdk-id }}
195195
installed-swift: ${{ steps.info.outputs.swift-root }}
196196

197-
- name: Checkout swift-nio
197+
- name: Checkout swift-crypto
198198
if: ${{ matrix.runner != 'self-hosted' }}
199199
uses: actions/checkout@v4
200200
with:
201-
repository: apple/swift-nio
202-
path: swift-nio
203-
- name: Test swift-nio
201+
repository: apple/swift-crypto
202+
path: swift-crypto
203+
- name: Test swift-crypto
204204
if: ${{ matrix.runner != 'self-hosted' }}
205205
uses: skiptools/swift-android-action@main
206206
with:
207-
package-path: swift-nio
207+
package-path: swift-crypto
208208
installed-sdk: ${{ steps.info.outputs.sdk-id }}
209209
installed-swift: ${{ steps.info.outputs.swift-root }}
210210

swift-ci/sdks/android/build-docker

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
TARGET_ARCHS=${TARGET_ARCHS:-aarch64,x86_64,armv7}
1919

2020
ANDROID_NDK_VERSION=android-ndk-r27d
21-
ANDROID_API=24
2221

2322
BASEPATH=$(dirname $(realpath $0))
2423
cd ${BASEPATH}
@@ -60,6 +59,5 @@ $DOCKER run -i --rm \
6059
--products-dir "/products" \
6160
--host-toolchain "/usr/local/swift" \
6261
--build-compiler "${BUILD_COMPILER}" \
63-
--android-api "${ANDROID_API}" \
6462
--ndk-home "/usr/local/ndk/${ANDROID_NDK_VERSION}" \
6563
--archs "${TARGET_ARCHS}"

swift-ci/sdks/android/build-local

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
TARGET_ARCHS=${TARGET_ARCHS:-aarch64,x86_64,armv7}
1919

2020
ANDROID_NDK_VERSION=android-ndk-r27d
21-
ANDROID_API=24
2221

2322
BASEPATH=$(dirname $(realpath $0))
2423
cd ${BASEPATH}
@@ -70,6 +69,5 @@ mkdir -p ${WORKDIR}/products
7069
--build-dir "${WORKDIR}/build" \
7170
--build-compiler "${BUILD_COMPILER}" \
7271
--host-toolchain "${HOST_TOOLCHAIN}" \
73-
--android-api "${ANDROID_API}" \
7472
--ndk-home "${ANDROID_NDK_HOME}" \
7573
--archs "${TARGET_ARCHS}"

swift-ci/sdks/android/scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ declare_package boringssl "boringssl" "OpenSSL AND ISC AND MIT" \
128128
android_sdk_version=0.1
129129
sdk_name=
130130
archs=aarch64,armv7,x86_64
131-
android_api=24
131+
android_api=23
132132
build_type=Release
133133
parallel_jobs=$(($(nproc --all) + 2))
134134
source_dir=

swift-ci/sdks/android/scripts/fetch-source.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,9 @@ perl -pi -e 's;try _throwIfPosixError\(posix_spawnattr_init;//try _throwIfPosixE
178178
perl -pi -e 's;try _throwIfPosixError\(posix_spawnattr_setflags;//try _throwIfPosixError\(posix_spawnattr_setflags;g' swift-project/swift-corelibs-foundation/Sources/Foundation/Process.swift
179179
perl -pi -e 's;posix_spawnattr_destroy;//posix_spawnattr_destroy;g' swift-project/swift-corelibs-foundation/Sources/Foundation/Process.swift
180180

181+
# fix getgrgid_r and getgrnam_r missing from Android API 23
182+
perl -pi -e 's;getgrgid_r;{ _, _, _, _, _ in 0 };g' swift-project/swift-foundation/Sources/FoundationEssentials/Platform.swift
183+
perl -pi -e 's;getgrnam_r;{ _, _, _, _, _ in 0 };g' swift-project/swift-foundation/Sources/FoundationEssentials/Platform.swift
184+
181185
groupend
182186

0 commit comments

Comments
 (0)