Skip to content

Commit fc9146e

Browse files
authored
Upgrade CI to Ubuntu 20.04 LTS (Focal) (#1183)
# Why On one hand Ubuntu18's free LTS cycle is ended, and on the other hand Ubuntu18 does not support nodejs greater than v18. # What's changed. 1. update the Linux Docker image to buildpack-deps:focal 2. some compatibility changes 3. use the new recommended way to install Docker ([see here](https://docs.docker.com/engine/install/ubuntu/)) See #1173
1 parent ce74ca2 commit fc9146e

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

.circleci/config.yml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ orbs:
44
win: circleci/windows@5.0
55

66
executors:
7-
bionic:
7+
ubuntu:
88
docker:
9-
- image: buildpack-deps:bionic
9+
- image: buildpack-deps:focal
1010
mac:
1111
environment:
1212
EMSDK_NOTTY: "1"
@@ -50,22 +50,20 @@ commands:
5050
5151
jobs:
5252
flake8:
53-
executor: bionic
53+
executor: ubuntu
5454
steps:
5555
- checkout
5656
- run:
5757
name: install pip
5858
command: |
5959
apt-get update -q
60-
apt-get install -q -y python-pip python3-pip
61-
- run: python2 -m pip install --upgrade pip
60+
apt-get install -q -y python3-pip
6261
- run: python3 -m pip install --upgrade pip
63-
- run: python2 -m pip install flake8==3.9.2
6462
- run: python3 -m pip install flake8==3.9.2
65-
- run: python2 -m flake8 --show-source --statistics --extend-exclude=./scripts
66-
- run: python3 -m flake8 --show-source --statistics
63+
- run: python3 -m flake8 --show-source --statistics --extend-exclude=./scripts
64+
6765
test-linux:
68-
executor: bionic
66+
executor: ubuntu
6967
environment:
7068
EMSDK_NOTTY: "1"
7169
# This is needed because the old gcc-7 that is installed on debian/bionic
@@ -174,12 +172,19 @@ jobs:
174172
test/test_path_preservation.ps1
175173
176174
build-docker-image-x64:
177-
executor: bionic
175+
executor: ubuntu
178176
steps:
179177
- checkout
180178
- run:
181179
name: install docker
182-
command: apt-get update -q && apt-get install -q -y docker.io
180+
command: |
181+
apt-get update -q
182+
apt-get install -q -y ca-certificates curl gnupg lsb-release
183+
mkdir -p /etc/apt/keyrings
184+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
185+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
186+
apt-get update -q
187+
apt-get install -q -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
183188
- setup_remote_docker
184189
# Build the `latest` version of EMSDK as docker image
185190
- run:
@@ -190,12 +195,19 @@ jobs:
190195
command: make -C ./docker version=latest test
191196

192197
publish-docker-image-x64:
193-
executor: bionic
198+
executor: ubuntu
194199
steps:
195200
- checkout
196201
- run:
197202
name: install docker
198-
command: apt-get update -q && apt-get install -q -y docker.io
203+
command: |
204+
apt-get update -q
205+
apt-get install -q -y ca-certificates curl gnupg lsb-release
206+
mkdir -p /etc/apt/keyrings
207+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
208+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
209+
apt-get update -q
210+
apt-get install -q -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
199211
- setup_remote_docker
200212
- run:
201213
name: build
@@ -226,7 +238,7 @@ jobs:
226238
make -C ./docker version=${CIRCLE_TAG} alias=${CIRCLE_TAG}-arm64 only_alias=true push
227239
228240
test-bazel-linux:
229-
executor: bionic
241+
executor: ubuntu
230242
steps:
231243
- checkout
232244
- run: apt-get install -q -y curl gnupg

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ https://emscripten.org/docs/building_from_source/toolchain_what_is_needed.html.
6767
- `python`: Version 2.7.0 or above.
6868
- `java`: For running closure compiler (optional)
6969

70-
The emsdk pre-compiled binaries are built against Ubuntu/Xenial 16.04 LTS and
70+
The emsdk pre-compiled binaries are built against Ubuntu/Focal 20.04 LTS and
7171
therefore depend on system libraries compatible with versions of `glibc` and
7272
`libstdc++` present in that release. If your linux distribution is very old
7373
you may not be able to use the pre-compiled binaries packages.

0 commit comments

Comments
 (0)