Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
ensure protoc is installed for CI
Browse files Browse the repository at this point in the history
Change-Id: I5b22ab5aeb21ecb04437c13da271830b94c268e9
  • Loading branch information
theganyo committed Mar 20, 2019
1 parent 5ec7c80 commit 83dc720
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
# test needs dep ensure to be run again, since the Mixer plugin install
# will have removed the vendor link.
- run: dep ensure
- run:
command: ./bin/install_protoc.sh
name: install protoc
- run:
command: go generate ./...
name: generate protos
Expand Down Expand Up @@ -73,6 +76,9 @@ jobs:
steps:
- checkout
- run: dep ensure
- run:
command: ./bin/install_protoc.sh
name: install protoc
- run:
command: go generate ./...
name: generate protos
Expand Down
10 changes: 10 additions & 0 deletions bin/install_protoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

if [[ `command -v protoc` == "" ]]; then
mkdir /tmp/protoc
wget -O /tmp/protoc/protoc.zip https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip
unzip /tmp/protoc/protoc.zip -d /tmp/protoc
sudo mv -f /tmp/protoc/bin/protoc /usr/bin/
sudo mv -f /tmp/protoc/include/google /usr/local/include/
rm -rf /tmp/protoc
fi

0 comments on commit 83dc720

Please sign in to comment.