Skip to content

Commit ea53e52

Browse files
committed
CI: update GHA instances from Ubuntu 18.04 to 20.04
The release binaries are built using Ubuntu 18.04 in Docker on Ubuntu 20.04 for glibc compatibility reason (issue 7255). Fix issue 7297 Signed-off-by: Akihiro Suda <[email protected]>
1 parent 2716289 commit ea53e52

2 files changed

Lines changed: 35 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,15 @@ jobs:
2525

2626
strategy:
2727
matrix:
28-
os: [ubuntu-18.04, macos-12, windows-2019]
28+
os: [ubuntu-20.04, macos-12, windows-2019]
2929

3030
steps:
31+
- name: Install dependencies
32+
if: matrix.os == 'ubuntu-20.04'
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y libbtrfs-dev
36+
3137
- uses: actions/setup-go@v3
3238
with:
3339
go-version: ${{ env.GO_VERSION }}
@@ -44,7 +50,7 @@ jobs:
4450
#
4551
project:
4652
name: Project Checks
47-
runs-on: ubuntu-18.04
53+
runs-on: ubuntu-20.04
4854
timeout-minutes: 5
4955

5056
steps:
@@ -72,7 +78,7 @@ jobs:
7278
#
7379
protos:
7480
name: Protobuf
75-
runs-on: ubuntu-18.04
81+
runs-on: ubuntu-20.04
7682
timeout-minutes: 5
7783

7884
defaults:
@@ -108,7 +114,7 @@ jobs:
108114

109115
man:
110116
name: Manpages
111-
runs-on: ubuntu-18.04
117+
runs-on: ubuntu-20.04
112118
timeout-minutes: 5
113119

114120
steps:
@@ -218,9 +224,15 @@ jobs:
218224

219225
strategy:
220226
matrix:
221-
os: [ubuntu-18.04, macos-12, windows-2019, windows-2022]
227+
os: [ubuntu-20.04, macos-12, windows-2019, windows-2022]
222228
go-version: ["1.19.2", "1.18.7"]
223229
steps:
230+
- name: Install dependencies
231+
if: matrix.os == 'ubuntu-20.04'
232+
run: |
233+
sudo apt-get update
234+
sudo apt-get install -y libbtrfs-dev
235+
224236
- uses: actions/setup-go@v3
225237
with:
226238
go-version: ${{ matrix.go-version }}
@@ -402,7 +414,7 @@ jobs:
402414
403415
integration-linux:
404416
name: Linux Integration
405-
runs-on: ubuntu-18.04
417+
runs-on: ubuntu-20.04
406418
timeout-minutes: 40
407419
needs: [project, linters, protos, man]
408420

@@ -436,7 +448,7 @@ jobs:
436448
env:
437449
RUNC_FLAVOR: ${{ matrix.runc }}
438450
run: |
439-
sudo apt-get install -y gperf
451+
sudo apt-get install -y gperf libbtrfs-dev
440452
script/setup/install-seccomp
441453
script/setup/install-runc
442454
script/setup/install-cni $(grep containernetworking/plugins go.mod | awk '{print $2}')

.github/workflows/release.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
jobs:
1212
check:
1313
name: Check Signed Tag
14-
runs-on: ubuntu-18.04
14+
runs-on: ubuntu-20.04
1515
timeout-minutes: 5
1616
outputs:
1717
stringver: ${{ steps.contentrel.outputs.stringver }}
@@ -53,29 +53,29 @@ jobs:
5353

5454
build:
5555
name: Build Release Binaries
56-
runs-on: ubuntu-${{ matrix.ubuntu }}
56+
runs-on: ubuntu-20.04
5757
needs: [check]
5858
timeout-minutes: 30
5959
strategy:
6060
matrix:
6161
include:
6262
# Choose an old release of Ubuntu to avoid glibc issue https://github.com/containerd/containerd/issues/7255
63-
- ubuntu: 18.04
64-
platform: linux/amd64
65-
- ubuntu: 18.04
66-
platform: linux/arm64
67-
- ubuntu: 18.04
68-
platform: linux/ppc64le
63+
- dockerfile-ubuntu: 18.04
64+
dockerfile-platform: linux/amd64
65+
- dockerfile-ubuntu: 18.04
66+
dockerfile-platform: linux/arm64
67+
- dockerfile-ubuntu: 18.04
68+
dockerfile-platform: linux/ppc64le
6969
# riscv64 isn't supported by Ubuntu 18.04
70-
- ubuntu: 22.04
71-
platform: linux/riscv64
72-
- ubuntu: 18.04
73-
platform: windows/amd64
70+
- dockerfile-ubuntu: 22.04
71+
dockerfile-platform: linux/riscv64
72+
- dockerfile-ubuntu: 18.04
73+
dockerfile-platform: windows/amd64
7474
steps:
7575
- name: Set env
7676
shell: bash
7777
env:
78-
MOS: ubuntu-${{ matrix.ubuntu }}
78+
MOS: ubuntu-20.04
7979
run: |
8080
releasever=${{ github.ref }}
8181
releasever="${releasever#refs/tags/}"
@@ -107,14 +107,14 @@ jobs:
107107
export PREFIX_LEN=12
108108
BUILD_ARGS="--build-arg GATEWAY --build-arg PREFIX_LEN"
109109
fi
110-
docker buildx build ${cache} --build-arg RELEASE_VER --build-arg UBUNTU_VERSION=${{ matrix.ubuntu }} --build-arg GO_VERSION ${BUILD_ARGS} -f .github/workflows/release/Dockerfile --platform=${PLATFORM} -o releases/ .
110+
docker buildx build ${cache} --build-arg RELEASE_VER --build-arg UBUNTU_VERSION=${{ matrix.dockerfile-ubuntu }} --build-arg GO_VERSION ${BUILD_ARGS} -f .github/workflows/release/Dockerfile --platform=${PLATFORM} -o releases/ .
111111
echo PLATFORM_CLEAN=${PLATFORM/\//-} >> $GITHUB_ENV
112112
113113
# Remove symlinks since we don't want these in the release Artifacts
114114
find ./releases/ -maxdepth 1 -type l | xargs rm
115115
working-directory: src/github.com/containerd/containerd
116116
env:
117-
PLATFORM: ${{ matrix.platform }}
117+
PLATFORM: ${{ matrix.dockerfile-platform }}
118118
- name: Save Artifacts
119119
uses: actions/upload-artifact@v2
120120
with:
@@ -123,7 +123,7 @@ jobs:
123123

124124
release:
125125
name: Create containerd Release
126-
runs-on: ubuntu-18.04
126+
runs-on: ubuntu-20.04
127127
timeout-minutes: 10
128128
needs: [build, check]
129129
steps:

0 commit comments

Comments
 (0)