Skip to content

Commit

Permalink
[travis] Cache protobuf compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Dzhabarov authored and rdzhabarov committed Oct 10, 2018
1 parent 6180027 commit a4cd662
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ dist: trusty
sudo: required
language: cpp

cache:
apt: true
directories:
- $BUILD_CCACHE_DIR
- $HOME/.ccache
- $HOME/.cache/pb
addons:
apt:
sources:
Expand All @@ -24,6 +30,7 @@ jobs:
- env:
- TEST_NAME=ASAN
install:
- export PATH="/usr/lib/ccache:$PATH"
- mkdir build && cd build
- CC=clang-6.0 CXX=clang++-6.0 cmake -G Ninja
-DCMAKE_BUILD_TYPE=Release -DGLOW_WITH_OPENCL=OFF -DGLOW_WITH_CPU=ON
Expand Down
8 changes: 6 additions & 2 deletions utils/install_protobuf.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/sh
set -ex

pb_dir="$HOME/.cache/pb"
mkdir -p "$pb_dir"

wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
tar -xzf protobuf-2.6.1.tar.gz
cd protobuf-2.6.1 && ./configure CC=gcc CXX=g++ CXX_FOR_BUILD=g++ --prefix=/usr && make && sudo make install
tar -xzf protobuf-2.6.1.tar.gz -C "$pb_dir" --strip-components 1
cd "$pb_dir" && ./configure CC=gcc CXX=g++ CXX_FOR_BUILD=g++ --prefix=/usr && make -j2 && sudo make install

0 comments on commit a4cd662

Please sign in to comment.