Skip to content

Commit c4803e5

Browse files
authored
Merge pull request #3 from pubref/travis
Update travis for osx.
2 parents 4701214 + 666da75 commit c4803e5

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

.travis.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,33 @@
1+
# trusty beta image has jdk8, gcc4.8.4
12
dist: trusty
23
sudo: required
3-
language: node_js
4+
# xcode8 has jdk8
5+
osx_image: xcode8
6+
# Not technically required but suppresses 'Ruby' in Job status message.
7+
language: java
8+
9+
os:
10+
- linux
11+
- osx
412

513
env:
6-
- V=0.3.2rc3 URL=https://storage.googleapis.com/bazel/0.3.2/rc3/bazel-0.3.2rc3-installer-linux-x86_64.sh FLAGS=''
7-
- V=0.3.2rc2 URL=https://storage.googleapis.com/bazel/0.3.2/rc2/bazel-0.3.2rc2-installer-linux-x86_64.sh FLAGS=''
8-
- V=0.3.1 URL=https://github.com/bazelbuild/bazel/releases/download/0.3.1/bazel-0.3.1-installer-linux-x86_64.sh FLAGS=''
14+
- V=HEAD
15+
- V=0.3.2
16+
- V=0.3.1
917

1018
before_install:
19+
- OS=linux
20+
- ARCH=x86_64
21+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then OS=darwin; fi
22+
- GH_BASE="https://github.com/bazelbuild/bazel/releases/download/$V"
23+
- GH_ARTIFACT="bazel-$V-installer-$OS-$ARCH.sh"
24+
- CI_BASE="http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=$OS-$ARCH/lastSuccessfulBuild/artifact/output/ci"
25+
- CI_ARTIFACT="bazel--installer.sh"
26+
- URL="$GH_BASE/$GH_ARTIFACT"
27+
- if [[ "$V" == "HEAD" && "$OS" == "linux" ]]; then CI_ARTIFACT="`wget -qO- $CI_BASE | grep -oP 'bazel-.*?-installer.sh' | uniq`"; fi
28+
- if [[ "$V" == "HEAD" && "$OS" == "osx" ]]; then CI_ARTIFACT="`wget -qO- $CI_BASE | pcregrep -o 'bazel-.*?-installer.sh' | uniq`"; fi
29+
- if [[ "$V" == "HEAD" ]]; then URL="$CI_BASE/$CI_ARTIFACT"; fi
30+
- echo $URL
1131
- wget -O install.sh $URL
1232
- chmod +x install.sh
1333
- ./install.sh --user

0 commit comments

Comments
 (0)