Skip to content

Commit eba8944

Browse files
authored
Build SwiftWasm distribution archive for Ubuntu 22.04 (#4545)
* Attempt to build on Ubuntu 22.04 * Don't attempt to uninstall {llvm,clang}-6.0 * Check if docker is running before `docker rmi` * Add ` "ubuntu22.04_x86_64"` to `build-toolchain.yml` * Add support for Ubuntu 22.04 to `build-toolchain.sh` * Handle Ubuntu 22.04 in `install-dependencies.sh`
1 parent f7ddc20 commit eba8944

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ on:
88
- swiftwasm-release/5.4
99
- swiftwasm-release/5.5
1010
- swiftwasm-release/5.6
11+
- swiftwasm-release/5.7
1112
pull_request:
1213
branches:
1314
- swiftwasm
1415
- swiftwasm-release/5.3
1516
- swiftwasm-release/5.4
1617
- swiftwasm-release/5.5
1718
- swiftwasm-release/5.6
19+
- swiftwasm-release/5.7
1820
types: [opened, synchronize, reopened, labeled]
1921
jobs:
2022
start-runner:
@@ -117,6 +119,17 @@ jobs:
117119
"clean_build_dir": false,
118120
"free_disk_space": true
119121
},
122+
{
123+
"build_os": "ubuntu-22.04",
124+
"agent_query": "ubuntu-22.04",
125+
"target": "ubuntu22.04_x86_64",
126+
"run_stdlib_test": true,
127+
"run_full_test": false,
128+
"run_e2e_test": true,
129+
"build_hello_wasm": true,
130+
"clean_build_dir": false,
131+
"free_disk_space": true
132+
},
120133
{
121134
"build_os": "macos-11",
122135
"agent_query": "macos-11",
@@ -201,13 +214,16 @@ jobs:
201214
if: ${{ matrix.free_disk_space }}
202215
run: |
203216
df -h
204-
sudo apt-get purge libgcc-9-dev gcc-9 libstdc++-9-dev libgcc-10-dev gcc-10 libstdc++-10-dev clang-6.0 llvm-6.0
217+
sudo apt-get purge libgcc-9-dev gcc-9 libstdc++-9-dev libgcc-10-dev gcc-10 libstdc++-10-dev
205218
sudo swapoff -a
206219
sudo rm -f /swapfile
207220
sudo rm -rf /opt/hostedtoolcache
208221
sudo rm -rf /usr/share/dotnet
209222
sudo apt clean
210-
docker rmi $(docker image ls -aq)
223+
224+
if docker info > /dev/null 2>&1; then
225+
docker rmi $(docker image ls -aq)
226+
fi
211227
df -h
212228
213229
- uses: actions/checkout@v2
@@ -247,7 +263,7 @@ jobs:
247263
run: |
248264
249265
case "${{ matrix.target }}" in
250-
"amazonlinux2_x86_64" | "ubuntu20.04_x86_64" | "ubuntu18.04_x86_64" | "ubuntu20.04_aarch64" | "macos_x86_64" | "macos_arm64")
266+
"amazonlinux2_x86_64" | "ubuntu22.04_x86_64" | "ubuntu20.04_x86_64" | "ubuntu18.04_x86_64" | "ubuntu20.04_aarch64" | "macos_x86_64" | "macos_arm64")
251267
./swift/utils/webassembly/ci.sh
252268
;;
253269
*)

utils/webassembly/build-toolchain.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ case $(uname -s) in
1818
OS_SUFFIX=ubuntu18.04_$(uname -m)
1919
elif [ "$(grep RELEASE /etc/lsb-release)" == "DISTRIB_RELEASE=20.04" ]; then
2020
OS_SUFFIX=ubuntu20.04_$(uname -m)
21+
elif [ "$(grep RELEASE /etc/lsb-release)" == "DISTRIB_RELEASE=22.04" ]; then
22+
OS_SUFFIX=ubuntu22.04_$(uname -m)
2123
elif [[ "$(grep PRETTY_NAME /etc/os-release)" == 'PRETTY_NAME="Amazon Linux 2"' ]]; then
2224
OS_SUFFIX=amazonlinux2_$(uname -m)
2325
else

utils/webassembly/linux/install-dependencies.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ else
5757
libpython2-dev libncurses5 libncurses5-dev pkg-config \
5858
libblocksruntime-dev libcurl4-openssl-dev \
5959
make systemtap-sdt-dev tzdata rsync wget llvm zip unzip
60+
elif [ $(grep RELEASE /etc/lsb-release) == "DISTRIB_RELEASE=22.04" ]; then
61+
sudo apt install -y \
62+
git ninja-build clang python3 python-six \
63+
uuid-dev libicu-dev icu-devtools libbsd-dev \
64+
libedit-dev libxml2-dev libsqlite3-dev swig \
65+
libpython2-dev libncurses5 libncurses5-dev pkg-config \
66+
libblocksruntime-dev libcurl4-openssl-dev \
67+
make systemtap-sdt-dev tzdata rsync wget llvm zip unzip
6068
else
6169
echo "Unknown Ubuntu version"
6270
exit 1

0 commit comments

Comments
 (0)