8000 Build protoc in Travis · bulejava/google-http-java-client@3cc6568 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3cc6568

Browse files
committed
Build protoc in Travis
This mostly fixes the Travis-CI build.
1 parent 88a60b8 commit 3cc6568

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.buildscript/build-proto.sh

Lines changed: 17 additions & 0 deletions
< 8000 td data-grid-cell-id="diff-b2be6da66c989b2f4f6d8f18ead5f7f7eb7290bbdbc100a6a5fcc92ee53c4fe9-empty-3-1" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionNum-bgColor, var(--diffBlob-addition-bgColor-num));text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative left-side">3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
+
set -ev
4+
5+
PROTO_VERSION="$1"
6+
PROTO_FOLDER="/tmp/proto$PROTO_VERSION"
7+
8+
# Can't check for presence of directory as cache auto-creates it.
9+
if [ ! -f "$PROTO_FOLDER/bin/protoc" ]; then
10+
wget -O - "https://github.com/google/protobuf/archive/v${PROTO_VERSION}.tar.gz" | tar xz -C /tmp
11+
cd "/tmp/protobuf-${PROTO_VERSION}"
12+
./autogen.sh
13+
./configure --prefix="$PROTO_FOLDER" --disable-shared
14+
make -j2
15+
make install
16+
fi
17+
echo "protoc is available at $PROTO_FOLDER/bin/protoc"

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
1+
sudo: false
2+
13
language: java
4+
5+
notifications:
6+
email: false
7+
8+
env:
9+
global:
10+
- PROTO_VERSION=2.4.1
11+
- PATH="/tmp/proto$PROTO_VERSION/bin:$PATH"
12+
213
jdk:
314
- oraclejdk8
415
- oraclejdk7
516
- openjdk7
617
- openjdk6
18+
19+
before_install:
20+
- .buildscript/build-proto.sh $PROTO_VERSION
21+
22+
cache:
23+
directories:
24+
- /tmp/proto$PROTO_VERSION

0 commit comments

Comments
 (0)
0