Skip to content

Update GitHub actions and add further debugging info #301

Update GitHub actions and add further debugging info

Update GitHub actions and add further debugging info #301

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
- pull_request
jobs:
build-linux:
name: Build on Linux
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.21
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Build for 386
run: GOOS=linux GOARCH=386 go build -v -x ./...
- name: Build for ARM
run: GOOS=linux GOARCH=arm go build -v -x ./...
- name: Build for ARM64
run: GOOS=linux GOARCH=arm64 go build -v -x ./...
- name: Build for AMD64
run: GOOS=linux GOARCH=amd64 go build -v -x ./...
- name: Build
run: go build -v ./...
- name: Build (Production Mode)
run: go build -v -tags slimcap_nomock ./...
- name: Test
run: |
go test -v ./... -covermode=atomic -coverprofile=coverage.out
go tool cover -func=coverage.out -o=coverage.out
- name: Test (Production Mode)
run: go test -v -tags slimcap_nomock ./...
- name: Race Detector
run: go test -race -v ./...
bench:
name: Benchmark
runs-on: [self-hosted, linux, benchmark-only]
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ^1.21
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
show-progress: false
- name: Run Comparative Benchmark
env:
BENCH_COUNT: 15
BENCH_TIME: 3s
run: |
env
go env
/home/app/bench.sh