Skip to content

build smaller binaries, add version subcommand (#333) #803

build smaller binaries, add version subcommand (#333)

build smaller binaries, add version subcommand (#333) #803

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Setup
uses: actions/setup-go@v4
with:
go-version: '>=1.20.0'
# otel-cli's main test needs the binary built ahead of time
# also this validates it can acutally build before we get there
- name: Build
# build with -s -w to reduce binary size and verify that build in test
run: go build -v -ldflags="-s -w -X main.version=test -X main.commit=${{ github.sha }}"
- name: Test
run: go test -v ./...