Skip to content

Commit

Permalink
Merge pull request #439 from ava-labs/go-install-buf
Browse files Browse the repository at this point in the history
Install buf with go
  • Loading branch information
geoff-vball authored Aug 20, 2024
2 parents 7b4c07f + 1cdf846 commit 5e4e2e9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,5 @@ jobs:
with:
submodules: recursive

- name: Install buf
uses: bufbuild/[email protected]

- name: Run E2E Tests
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego DATA_DIR=/tmp/e2e-test/data ./scripts/e2e_test.sh
3 changes: 0 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
with:
go-version-file: 'go.mod'

- name: Install buf
uses: bufbuild/[email protected]

- name: Run Lint
run: ./scripts/lint.sh --go-lint

Expand Down
1 change: 1 addition & 0 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ source $RELAYER_PATH/scripts/versions.sh
go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
golangci-lint run --config=$RELAYER_PATH/.golangci.yml --build-tags=testing ./... --timeout 5m

go install -v github.com/bufbuild/buf/cmd/buf@${BUF_VERSION}
(cd proto && buf lint)
7 changes: 1 addition & 6 deletions scripts/protobuf_codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ RELAYER_PATH=$(

source $RELAYER_PATH/scripts/versions.sh

## ensure the correct version of "buf" is installed
BUF_VERSION='1.36.0'
if [[ $(buf --version | cut -f2 -d' ') != "${BUF_VERSION}" ]]; then
echo "could not find buf ${BUF_VERSION}, is it installed + in PATH?"
exit 255
fi
go install -v github.com/bufbuild/buf/cmd/buf@${BUF_VERSION}

## install "protoc-gen-go"
PROTOC_GEN_GO_VERSION=$(getDepVersion google.golang.org/protobuf)
Expand Down
3 changes: 3 additions & 0 deletions scripts/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ SUBNET_EVM_VERSION=${SUBNET_EVM_VERSION:-update-avago-teleporter}

# Set golangci-lint version
GOLANGCI_LINT_VERSION=${GOLANGCI_LINT_VERSION:-'v1.60'}

# Set buf version
BUF_VERSION=${BUF_VERSION:-'v1.37.0'}

0 comments on commit 5e4e2e9

Please sign in to comment.