Skip to content

Commit d26d087

Browse files
authored
Add amazonlinux2_x86_64 target to GHA CI runs (#4153)
Fully implements #2318. Distribution build can now complete successfully in this configuration, but I had to disable stdlib tests due to #4152.
1 parent 404c46b commit d26d087

File tree

2 files changed

+68
-23
lines changed

2 files changed

+68
-23
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ jobs:
2323
strategy:
2424
matrix:
2525
include:
26+
- build_os: amazon-linux-2
27+
agent_query: [AmazonLinux2, X64]
28+
target: amazonlinux2_x86_64
29+
run_stdlib_test: false
30+
run_full_test: false
31+
run_e2e_test: false
32+
build_hello_wasm: true
33+
clean_build_dir: true
34+
2635
- build_os: ubuntu-18.04
2736
agent_query: ubuntu-18.04
2837
target: ubuntu18.04_x86_64
@@ -134,7 +143,7 @@ jobs:
134143
run: |
135144
136145
case "${{ matrix.target }}" in
137-
"ubuntu20.04_x86_64" | "ubuntu18.04_x86_64" | "ubuntu20.04_aarch64" | "macos_x86_64" | "macos_arm64")
146+
"amazonlinux2_x86_64" | "ubuntu20.04_x86_64" | "ubuntu18.04_x86_64" | "ubuntu20.04_aarch64" | "macos_x86_64" | "macos_arm64")
138147
./swift/utils/webassembly/ci.sh
139148
;;
140149
*)

utils/webassembly/linux/install-dependencies.sh

Lines changed: 58 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,67 @@
22

33
set -ex
44

5-
sudo apt update
5+
if [[ "$(cat /etc/system-release)" == *"Amazon Linux release 2"* ]]; then
6+
sudo yum -y install \
7+
clang \
8+
curl-devel \
9+
gcc-c++ \
10+
git \
11+
glibc-static \
12+
libbsd-devel \
13+
libedit-devel \
14+
libicu-devel \
15+
libuuid-devel \
16+
libxml2-devel \
17+
ncurses-compat-libs \
18+
ncurses-devel \
19+
ninja-build \
20+
pexpect \
21+
pkgconfig \
22+
procps-ng \
23+
python \
24+
python-devel \
25+
python-pkgconfig \
26+
python-six \
27+
python3-devel \
28+
rsync \
29+
sqlite-devel \
30+
swig \
31+
tzdata \
32+
uuid-devel \
33+
wget \
34+
which
635

7-
if [ $(grep RELEASE /etc/lsb-release) == "DISTRIB_RELEASE=18.04" ]; then
8-
sudo apt install -y \
9-
git ninja-build clang-10 python python-six \
10-
uuid-dev libicu-dev icu-devtools libbsd-dev \
11-
libedit-dev libxml2-dev libsqlite3-dev swig \
12-
libpython-dev libncurses5 libncurses5-dev pkg-config \
13-
libblocksruntime-dev libcurl4-openssl-dev \
14-
make systemtap-sdt-dev tzdata rsync wget llvm-10 zip unzip
15-
sudo ln -s -f /usr/bin/clang-10 /usr/bin/clang
16-
sudo ln -s -f /usr/bin/clang++-10 /usr/bin/clang++
17-
elif [ $(grep RELEASE /etc/lsb-release) == "DISTRIB_RELEASE=20.04" ]; then
18-
sudo apt install -y \
19-
git ninja-build clang python python-six \
20-
uuid-dev libicu-dev icu-devtools libbsd-dev \
21-
libedit-dev libxml2-dev libsqlite3-dev swig \
22-
libpython2-dev libncurses5 libncurses5-dev pkg-config \
23-
libblocksruntime-dev libcurl4-openssl-dev \
24-
make systemtap-sdt-dev tzdata rsync wget llvm zip unzip
36+
if [ ! -e /usr/local/bin/ninja ]; then
37+
sudo ln -s /usr/bin/ninja-build /usr/local/bin/ninja
38+
fi
2539
else
26-
echo "Unknown Ubuntu version"
27-
exit 1
40+
sudo apt update
41+
42+
if [ $(grep RELEASE /etc/lsb-release) == "DISTRIB_RELEASE=18.04" ]; then
43+
sudo apt install -y \
44+
git ninja-build clang-10 python python-six \
45+
uuid-dev libicu-dev icu-devtools libbsd-dev \
46+
libedit-dev libxml2-dev libsqlite3-dev swig \
47+
libpython-dev libncurses5 libncurses5-dev pkg-config \
48+
libblocksruntime-dev libcurl4-openssl-dev \
49+
make systemtap-sdt-dev tzdata rsync wget llvm-10 zip unzip
50+
sudo ln -s -f /usr/bin/clang-10 /usr/bin/clang
51+
sudo ln -s -f /usr/bin/clang++-10 /usr/bin/clang++
52+
elif [ $(grep RELEASE /etc/lsb-release) == "DISTRIB_RELEASE=20.04" ]; then
53+
sudo apt install -y \
54+
git ninja-build clang python python-six \
55+
uuid-dev libicu-dev icu-devtools libbsd-dev \
56+
libedit-dev libxml2-dev libsqlite3-dev swig \
57+
libpython2-dev libncurses5 libncurses5-dev pkg-config \
58+
libblocksruntime-dev libcurl4-openssl-dev \
59+
make systemtap-sdt-dev tzdata rsync wget llvm zip unzip
60+
else
61+
echo "Unknown Ubuntu version"
62+
exit 1
63+
fi
64+
sudo apt clean
2865
fi
29-
sudo apt clean
3066

3167
SOURCE_PATH="$( cd "$(dirname $0)/../../../.." && pwd )"
3268
SWIFT_PATH=$SOURCE_PATH/swift

0 commit comments

Comments
 (0)