Skip to content

Commit a66ab9b

Browse files
committed
CI: enable additional Linux distributions
The issues causing Amazon Linux 2 and Debian Bookworm to be unusable in GitHub actions have been corrected.
1 parent e3d484f commit a66ab9b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/scripts/linux_pre_build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
set -e
1515

16-
if command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy
16+
if command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy, focal
1717
export DEBIAN_FRONTEND=noninteractive
1818

1919
apt-get update -y
@@ -31,16 +31,16 @@ if command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy
3131
# Android NDK
3232
dpkg_architecture="$(dpkg --print-architecture)"
3333
if [[ "$SKIP_ANDROID" != "1" ]] && [[ "$dpkg_architecture" == amd64 ]] ; then
34-
eval "$(cat /etc/lsb-release)"
35-
case "$DISTRIB_CODENAME" in
36-
bookworm|jammy)
34+
eval "$(cat /etc/os-release)"
35+
case "$VERSION_CODENAME" in
36+
bookworm|jammy|focal)
3737
: # Not available
3838
;;
3939
noble)
4040
apt-get install -y google-android-ndk-r26c-installer
4141
;;
4242
*)
43-
echo "Unknown distribution: $DISTRIB_CODENAME" >&2
43+
echo "Unable to fetch Android NDK for unknown Linux distribution: $VERSION_CODENAME" >&2
4444
exit 1
4545
esac
4646
else

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Test
1414
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
1515
with:
16-
linux_os_versions: '["noble", "jammy", "rhel-ubi9"]'
16+
linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "focal", "rhel-ubi9"]'
1717
linux_pre_build_command: ./.github/scripts/linux_pre_build.sh
1818
linux_build_command: 'swift test --no-parallel'
1919
linux_swift_versions: '["nightly-main", "nightly-6.2"]'

0 commit comments

Comments
 (0)