Skip to content

Add multi-arch builds #6

Add multi-arch builds

Add multi-arch builds #6

Workflow file for this run

name: Push
on:
push:
branches: [ "main" ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
container: golang:1.22.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test
run: go test -v ./...
build-linux-amd64:
env:
GOOS: linux
GOARCH: amd64
name: Build (linux/amd64)
needs:
- test
runs-on: ubuntu-latest
container: golang:1.22.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: go build -ldflags="-s -w" -o microq main.go
build-linux-arm64:
env:
GOOS: linux
GOARCH: arm64
name: Build (linux/arm64)
needs:
- test
runs-on: ubuntu-latest
container: golang:1.22.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: go build -ldflags="-s -w" -o microq main.go
build-darwin-arm64:
env:
GOOS: darwin
GOARCH: arm64
name: Build (darwin/arm64)
needs:
- test
runs-on: ubuntu-latest
container: golang:1.22.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: go build -ldflags="-s -w" -o microq main.go
build-windows-amd64:
env:
GOOS: windows
GOARCH: amd64
name: Build (windows/amd64)
needs:
- test
runs-on: ubuntu-latest
container: golang:1.22.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: go build -ldflags="-s -w" -o microq main.go
build-windows-arm64:
env:
GOOS: windows
GOARCH: arm64
name: Build (windows/arm64)
needs:
- test
runs-on: ubuntu-latest
container: golang:1.22.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: go build -ldflags="-s -w" -o microq main.go
analyze:
name: Analyze Go
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
security-events: write
needs:
- build-linux-amd64
- build-linux-arm64
- build-darwin-arm64
- build-windows-amd64
- build-windows-arm64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go
build-mode: autobuild
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:go"