Skip to content

Mirrored multiply.

Mirrored multiply. #22

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: false
- name: Tidy
run: go mod tidy
- name: Vet
run: go vet ./...
- name: Test
run: go test -v ./...
build:
needs: test
strategy:
matrix:
goos: [linux, darwin]
goarch: [arm64, amd64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: false
- name: Build
working-directory: ./cmd/bfg
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: go build -a -trimpath -ldflags='-s -w' -o bfg_${{ matrix.goos }}_${{ matrix.goarch }}
- uses: actions/upload-artifact@v4
with:
name: bfg_${{ matrix.goos }}_${{ matrix.goarch }}
path: cmd/bfg/bfg_${{ matrix.goos }}_${{ matrix.goarch }}