Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 49 additions & 16 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:

build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
Expand All @@ -23,26 +23,59 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v9

test:
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 ./...
Comment thread
coderabbitai[bot] marked this conversation as resolved.

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
Comment thread
Stringy marked this conversation as resolved.
Comment thread
Stringy marked this conversation as resolved.
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/')
Expand All @@ -52,11 +85,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/*