Skip to content

Commit 4818610

Browse files
committed
release: rollback Ubuntu to 18.04 (except for riscv64)
Partially revert 0e56e4f Rollback the build environment from Ubuntu 22.04 to 18.04, except for riscv64 that isn't supported by Ubuntu 18.04. Fix issue 7255 (`1.6.7 can't be run on Ubuntu LTS 20.04 (GLIBC_2.34 not found)`) Signed-off-by: Akihiro Suda <[email protected]>
1 parent 01a2b79 commit 4818610

2 files changed

Lines changed: 20 additions & 12 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,24 @@ jobs:
5353

5454
build:
5555
name: Build Release Binaries
56-
runs-on: ${{ matrix.os }}
56+
runs-on: ubuntu-${{ matrix.ubuntu }}
5757
needs: [check]
5858
timeout-minutes: 10
5959
strategy:
6060
matrix:
61-
os: [ubuntu-18.04]
62-
platform:
63-
- linux/amd64
64-
- linux/arm64
65-
- linux/ppc64le
66-
- linux/riscv64
67-
- windows/amd64
61+
include:
62+
# 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
69+
# riscv64 isn't supported by Ubuntu 18.04
70+
- ubuntu: 22.04
71+
platform: linux/riscv64
72+
- ubuntu: 18.04
73+
platform: windows/amd64
6874
steps:
6975
- name: Install Go
7076
uses: actions/setup-go@v2
@@ -73,7 +79,7 @@ jobs:
7379
- name: Set env
7480
shell: bash
7581
env:
76-
MOS: ${{ matrix.os }}
82+
MOS: ubuntu-${{ matrix.ubuntu }}
7783
run: |
7884
releasever=${{ github.ref }}
7985
releasever="${releasever#refs/tags/}"
@@ -105,7 +111,7 @@ jobs:
105111
export PREFIX_LEN=12
106112
BUILD_ARGS="--build-arg GATEWAY --build-arg PREFIX_LEN"
107113
fi
108-
docker buildx build ${cache} --build-arg RELEASE_VER --build-arg GO_VERSION ${BUILD_ARGS} -f .github/workflows/release/Dockerfile --platform=${PLATFORM} -o releases/ .
114+
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/ .
109115
echo PLATFORM_CLEAN=${PLATFORM/\//-} >> $GITHUB_ENV
110116
111117
# Remove symlinks since we don't want these in the release Artifacts

.github/workflows/release/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG UBUNTU_VERSION=22.04
15+
# UBUNTU_VERSION can be set to 18.04 (bionic), 20.04 (focal), or 22.04 (jammy)
16+
ARG UBUNTU_VERSION=18.04
1617
ARG BASE_IMAGE=ubuntu:${UBUNTU_VERSION}
1718
ARG GO_VERSION
1819
ARG GO_IMAGE=golang:${GO_VERSION}
@@ -25,7 +26,8 @@ SHELL ["/bin/bash", "-xec"]
2526
RUN apt-get update && \
2627
apt-get install -y dpkg-dev git make pkg-config
2728
ARG TARGETPLATFORM
28-
RUN xx-apt-get install -y libseccomp-dev libbtrfs-dev gcc
29+
RUN xx-apt-get install -y libseccomp-dev btrfs-progs gcc
30+
RUN if grep -qE 'UBUNTU_CODENAME=(focal|jammy)' /etc/os-release; then xx-apt-get install -y libbtrfs-dev; fi
2931
ENV PATH=/usr/local/go/bin:$PATH
3032
ENV GOPATH=/go
3133
ENV CGO_ENABLED=1

0 commit comments

Comments
 (0)