From a6db75392bd62478a29bdaa692ffde949fe3be31 Mon Sep 17 00:00:00 2001 From: Giles Hutton Date: Fri, 4 Sep 2026 13:29:18 +0100 Subject: [PATCH 1/2] Add multi-arch builds; arm64, s390x, ppc64le --- .github/workflows/go.yml | 59 +++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4d705c5..b9902ef 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -10,7 +10,7 @@ on: jobs: - build: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 @@ -23,26 +23,53 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v9 + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Test + run: go test -v ./... + + build: + needs: + - lint + - test + runs-on: ubuntu-latest + strategy: + matrix: + goarch: [amd64, arm64, ppc64le, s390x] + steps: + - uses: actions/checkout@v7 + + - name: Set up Go + uses: actions/setup-go@v7 + with: + go-version-file: 'go.mod' + - name: Build - run: CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w' -v -o . ./... + env: + GOOS: linux + GOARCH: ${{ matrix.goarch }} + CGO_ENABLED: 0 + run: | + mkdir -p dist + go build -a -tags netgo -ldflags '-s -w' -v -o "dist/junit2jira-linux-${GOARCH}" ./cmd/junit2jira + go build -a -tags netgo -ldflags '-s -w' -v -o "dist/flakechecker-linux-${GOARCH}" ./cmd/flakechecker - name: Compress binaries + if: ${{ matrix.goarch != 's390x' }} uses: svenstaro/upx-action@v3 with: + strip: false files: | - junit2jira - flakechecker - - - name: Test - run: go test -v ./... + dist/junit2jira-linux-${{ matrix.goarch }} + dist/flakechecker-linux-${{ matrix.goarch }} - - name: Upload binary + - name: Upload binaries uses: actions/upload-artifact@v7 with: - name: junit2jira - path: | - junit2jira - flakechecker + name: junit2jira-linux-${{ matrix.goarch }} + path: dist/* release: if: startsWith(github.ref, 'refs/tags/') @@ -52,11 +79,11 @@ jobs: - name: Download executables uses: actions/download-artifact@v8 with: - name: junit2jira + pattern: junit2jira-linux-* + path: dist + merge-multiple: true - name: Release uses: softprops/action-gh-release@v3 if: startsWith(github.ref, 'refs/tags/') with: - files: | - junit2jira - flakechecker + files: dist/* From d636fb5ecc9b0fe2cbe845338e8328c7a35d87a3 Mon Sep 17 00:00:00 2001 From: Giles Hutton Date: Fri, 4 Sep 2026 14:04:06 +0100 Subject: [PATCH 2/2] Ensure go set up before test --- .github/workflows/go.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b9902ef..bd078c5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -27,6 +27,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 + + - name: Set up Go + uses: actions/setup-go@v7 + with: + go-version-file: 'go.mod' + - name: Test run: go test -v ./...