Skip to content

Fix build workflow (#2) #24

Fix build workflow (#2)

Fix build workflow (#2) #24

Workflow file for this run

name: build
on:
push:
branches:
- master
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: subdir/go.sum
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Installing protoc-gen-go
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
- name: Install libpcap
run: sudo apt-get install libpcap-dev
- name: Protoc version
run: PATH=$HOME/bin:$PATH protoc --version
- name: env
run: env && go env && pwd
- name: Protogen
run: protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative $(find . -type f -name '*.proto')
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...