From c398037914484060f5133de9932ab6668bebcb65 Mon Sep 17 00:00:00 2001 From: Cezar Craciunoiu Date: Mon, 1 Jul 2024 13:12:46 +0300 Subject: [PATCH 1/3] feat(workflows): Upload artifacts on build success Signed-off-by: Cezar Craciunoiu --- .github/workflows/build.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 80a9bf40a..d63e1276b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -52,3 +52,12 @@ jobs: - name: Build run: | UNAME_OS=${{ matrix.GOOS }} UNAME_ARCH=${{ matrix.GOARCH }} make kraft + + - name: Upload build artifacts to GitHub + uses: actions/upload-artifact@v4 + with: + name: kraft-${{ matrix.GOOS }}-${{ matrix.GOARCH }}-${{ github.event.pull_request.number}} + path: ./dist/kraft + if-no-files-found: error + retention-days: 7 + overwrite: true From ddbfa9063efb7572c6e462523d97b1839e38d6d3 Mon Sep 17 00:00:00 2001 From: Cezar Craciunoiu Date: Mon, 1 Jul 2024 15:07:37 +0300 Subject: [PATCH 2/3] fix(workflows): Correctly pass plat/arch/version into builds Signed-off-by: Cezar Craciunoiu --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d63e1276b..5f6dc534c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -51,7 +51,7 @@ jobs: - name: Build run: | - UNAME_OS=${{ matrix.GOOS }} UNAME_ARCH=${{ matrix.GOARCH }} make kraft + VERSION=pr-${{ github.event.number }} GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} make kraft - name: Upload build artifacts to GitHub uses: actions/upload-artifact@v4 From ef3b6bae862994cb19395ba9db6c46ffc8bf5f61 Mon Sep 17 00:00:00 2001 From: Cezar Craciunoiu Date: Mon, 1 Jul 2024 15:30:13 +0300 Subject: [PATCH 3/3] fix(workflows): Remove 'freebsd' from PR testing This is done as freebsd requires a custom toolchain to build it. For now we can test/fix on releases. Signed-off-by: Cezar Craciunoiu --- .github/workflows/build.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5f6dc534c..8022d85fb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,10 +28,12 @@ jobs: GOARCH: amd64 - GOOS: darwin GOARCH: arm64 - - GOOS: freebsd - GOARCH: amd64 - - GOOS: freebsd - GOARCH: arm64 + # FIXME(craciunoiuc): Enable FreeBSD builds when the build environment + # contains the freebsd toolchain. + # - GOOS: freebsd + # GOARCH: amd64 + # - GOOS: freebsd + # GOARCH: arm64 - GOOS: linux GOARCH: amd64 - GOOS: linux