From af2d65b52664bd3cbad2adad614fc4c2b7b2630f Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:08:44 +0100 Subject: [PATCH 1/2] dockerfile: use lld linker for containerd build Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 576c5e3686de..3e674530280a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -203,7 +203,7 @@ VOLUME /var/lib/buildkit FROM gobuild-base AS containerd-build WORKDIR /go/src/github.com/containerd/containerd ARG TARGETPLATFORM -ENV CGO_ENABLED=1 BUILDTAGS=no_btrfs GO111MODULE=off +ENV CGO_ENABLED=1 CGO_LDFLAGS="-fuse-ld=lld" BUILDTAGS=no_btrfs GO111MODULE=off RUN xx-apk add musl-dev gcc && xx-go --wrap COPY --chmod=755 <<-EOT /build.sh #!/bin/sh From 787d9d078a3c4083d5f69f51a228151d61f969fe Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:17:43 +0100 Subject: [PATCH 2/2] ci: test sandbox build with multiple platforms Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/test-os.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/test-os.yml b/.github/workflows/test-os.yml index 4588fc131c27..6c753bb7cba9 100644 --- a/.github/workflows/test-os.yml +++ b/.github/workflows/test-os.yml @@ -230,3 +230,33 @@ jobs: if: always() run: | vagrant ssh -- "sudo cat /vagrant/.tmp/logs/containerd" + + sandbox-build: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + version: ${{ env.SETUP_BUILDX_VERSION }} + driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }} + buildkitd-flags: --debug + - + name: Build + uses: docker/bake-action@v5 + with: + targets: integration-tests-base + set: | + *.platform=${{ matrix.platform }}