From 0194a9f418325ffe91a79776410f34e6e503f426 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 20 Oct 2023 21:31:33 +0200 Subject: [PATCH 1/2] dockerfile: smoke tests for binaries Signed-off-by: CrazyMax --- Dockerfile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8de348cebb75..4be2e7da0b5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,9 +73,13 @@ ARG TARGETPLATFORM # lld has issues building static binaries for ppc so prefer ld for it RUN set -e; xx-apk add musl-dev gcc libseccomp-dev libseccomp-static; \ [ "$(xx-info arch)" != "ppc64le" ] || XX_CC_PREFER_LINKER=ld xx-clang --setup-target-triple -RUN --mount=from=runc-src,src=/usr/src/runc,target=. --mount=target=/root/.cache,type=cache \ - CGO_ENABLED=1 xx-go build -mod=vendor -ldflags '-extldflags -static' -tags 'apparmor seccomp netgo cgo static_build osusergo' -o /usr/bin/runc ./ && \ +RUN --mount=from=runc-src,src=/usr/src/runc,target=. \ + --mount=target=/root/.cache,type=cache < Date: Fri, 20 Oct 2023 21:31:47 +0200 Subject: [PATCH 2/2] ci: make test job depends on binaries one This will ensure binaries are not borken before going any further in the pipeline. Signed-off-by: CrazyMax --- .github/workflows/buildkit.yml | 50 ++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/buildkit.yml b/.github/workflows/buildkit.yml index 3984b98d6c93..a77eef798ea0 100644 --- a/.github/workflows/buildkit.yml +++ b/.github/workflows/buildkit.yml @@ -29,30 +29,6 @@ env: DESTDIR: "./bin" jobs: - test: - uses: ./.github/workflows/.test.yml - with: - cache_scope: build-integration-tests - pkgs: ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend - kinds: integration - codecov_flags: core - includes: | - - pkg: ./... - skip-integration-tests: 1 - typ: integration gateway - - pkg: ./client - worker: containerd - tags: nydus - typ: integration - - pkg: ./client - worker: oci - tags: nydus - typ: integration - - pkg: ./... - tags: nydus - skip-integration-tests: 1 - typ: integration - prepare: runs-on: ubuntu-22.04 outputs: @@ -135,6 +111,32 @@ jobs: path: ${{ env.DESTDIR }}/* if-no-files-found: error + test: + uses: ./.github/workflows/.test.yml + needs: + - binaries + with: + cache_scope: build-integration-tests + pkgs: ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend + kinds: integration + codecov_flags: core + includes: | + - pkg: ./... + skip-integration-tests: 1 + typ: integration gateway + - pkg: ./client + worker: containerd + tags: nydus + typ: integration + - pkg: ./client + worker: oci + tags: nydus + typ: integration + - pkg: ./... + tags: nydus + skip-integration-tests: 1 + typ: integration + image: runs-on: ubuntu-22.04 needs: