Skip to content

Commit

Permalink
CI: use Go 1.22
Browse files Browse the repository at this point in the history
The main branch of containerd now depends on Go 1.22, so we have to
upgrade the CI to Go 1.22.

The runc binary is still built with Go 1.21 due to
opencontainers/runc issue 4233.

Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda authored and sondavidb committed Jun 19, 2024
1 parent cdf6631 commit 57ff86d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/[email protected]
- uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x
- name: "Compile binaries"
run: make artifacts
- name: "SHA256SUMS"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request:

env:
GO_VERSION: 1.21.x
GO_VERSION: 1.22.x

jobs:
project:
Expand Down
18 changes: 16 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ARG TINI_VERSION=v0.19.0
ARG BUILDG_VERSION=v0.4.1

# Test deps
ARG GO_VERSION=1.21
ARG GO_VERSION=1.22
ARG UBUNTU_VERSION=22.04
ARG CONTAINERIZED_SYSTEMD_VERSION=v0.1.1
ARG GOTESTSUM_VERSION=v1.11.0
Expand All @@ -65,6 +65,18 @@ ARG TARGETARCH
RUN xx-apt-get update && \
xx-apt-get install -y binutils gcc libc6-dev libbtrfs-dev libseccomp-dev

# runc still requires Go 1.21
# https://github.com/opencontainers/runc/issues/4233
FROM --platform=$BUILDPLATFORM golang:1.21-bullseye AS build-base-debian-go121
COPY --from=xx / /
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y git pkg-config dpkg-dev
ARG TARGETARCH
# libseccomp: for runc
RUN xx-apt-get update && \
xx-apt-get install -y binutils gcc libc6-dev libseccomp-dev

FROM build-base-debian AS build-containerd
ARG TARGETARCH
ARG CONTAINERD_VERSION
Expand All @@ -76,7 +88,9 @@ RUN git checkout ${CONTAINERD_VERSION} && \
RUN GO=xx-go make STATIC=1 && \
cp -a bin/containerd bin/containerd-shim-runc-v2 bin/ctr /out/$TARGETARCH

FROM build-base-debian AS build-runc
# runc still requires Go 1.21
# https://github.com/opencontainers/runc/issues/4233
FROM build-base-debian-go121 AS build-runc
ARG RUNC_VERSION
ARG TARGETARCH
RUN git clone https://github.com/opencontainers/runc.git /go/src/github.com/opencontainers/runc
Expand Down

0 comments on commit 57ff86d

Please sign in to comment.