init #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Install libhackrf (provides pkg-config: libhackrf for cgo)" | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libhackrf-dev pkg-config | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26' | |
| check-latest: true | |
| - name: Verify formatting | |
| run: | | |
| unformatted=$(gofmt -l .) | |
| if [ -n "$unformatted" ]; then | |
| echo "These files need gofmt:"; echo "$unformatted"; exit 1 | |
| fi | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Test | |
| env: | |
| CGO_ENABLED: '1' | |
| run: go test -race ./... | |
| - name: Build logger | |
| env: | |
| CGO_ENABLED: '1' | |
| run: go build -o hackrf-logger ./cmd/hackrf-logger |