Allow cache to be shared between Linux and OS X

It doesn't appear that OS X is saving its cache yet, so this may not be
needed in the future, but for now we need OS X to avoid attempting to
use the Linux binaries.
This commit is contained in:
Eric Anderson 2016-04-27 15:23:35 -07:00
parent b0ed77ad81
commit 80f73a4a16
2 changed files with 6 additions and 6 deletions

View File

@ -6,15 +6,15 @@ env:
global: global:
- GRADLE_OPTS=-Xmx512m - GRADLE_OPTS=-Xmx512m
- PROTOBUF_VERSION=3.0.0-beta-2 - PROTOBUF_VERSION=3.0.0-beta-2
- LDFLAGS=-L/tmp/protobuf-${PROTOBUF_VERSION}/lib - LDFLAGS=-L/tmp/protobuf/lib
- CXXFLAGS=-I/tmp/protobuf-${PROTOBUF_VERSION}/include - CXXFLAGS=-I/tmp/protobuf/include
- LD_LIBRARY_PATH=/tmp/protobuf-${PROTOBUF_VERSION}/lib - LD_LIBRARY_PATH=/tmp/protobuf/lib
before_install: before_install:
# Work around https://github.com/travis-ci/travis-ci/issues/2317 # Work around https://github.com/travis-ci/travis-ci/issues/2317
- if \[ "$TRAVIS_OS_NAME" = linux \]; then jdk_switcher use oraclejdk8; fi - if \[ "$TRAVIS_OS_NAME" = linux \]; then jdk_switcher use oraclejdk8; fi
- if \[ "$TRAVIS_OS_NAME" = osx \]; then brew update; fi
- buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf-${PROTOBUF_VERSION} - buildscripts/make_dependencies.sh # build protoc into /tmp/protobuf-${PROTOBUF_VERSION}
- ln -s "/tmp/protobuf-${PROTOBUF_VERSION}/$(uname -s)-$(uname -p)" /tmp/protobuf
- mkdir -p $HOME/.gradle - mkdir -p $HOME/.gradle
- echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties - echo "checkstyle.ignoreFailures=false" >> $HOME/.gradle/gradle.properties

View File

@ -4,7 +4,7 @@
set -ev set -ev
DOWNLOAD_DIR=/tmp/source DOWNLOAD_DIR=/tmp/source
INSTALL_DIR=/tmp/protobuf-${PROTOBUF_VERSION} INSTALL_DIR="/tmp/protobuf-$PROTOBUF_VERSION/$(uname -s)-$(uname -p)"
mkdir -p $DOWNLOAD_DIR mkdir -p $DOWNLOAD_DIR
# Make protoc # Make protoc
@ -17,7 +17,7 @@ else
pushd $DOWNLOAD_DIR/protobuf-${PROTOBUF_VERSION} pushd $DOWNLOAD_DIR/protobuf-${PROTOBUF_VERSION}
./autogen.sh ./autogen.sh
# install here so we don't need sudo # install here so we don't need sudo
./configure --prefix=${INSTALL_DIR} ./configure --prefix="$INSTALL_DIR"
make -j$(nproc) make -j$(nproc)
make install make install
popd popd