Merge pull request #25 from sebright/build-with-maven-2

Build with Maven in CI.
pull/27/head
sebright 8 years ago committed by GitHub
commit 3816647399
  1. 45
      .travis.yml
  2. 3
      pom.xml

@ -1,17 +1,46 @@
sudo: required
dist: trusty
language: java
jdk:
- oraclejdk8
matrix:
include:
- language: java
jdk: oraclejdk8
env: BUILD=MVN
- language: java
jdk: oraclejdk8
env: BUILD=BAZEL
before_install:
- echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
- curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add -
- sudo apt-get update
- case "$BUILD" in
"BAZEL")
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list ;
curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add - ;
sudo apt-get update ;;
esac
install:
- sudo apt-get install bazel
- case "$BUILD" in
"BAZEL")
sudo apt-get install bazel ;
bazel version;;
"MVN")
mkdir protoc ;
cd protoc ;
curl -L -o protoc.zip https://github.com/google/protobuf/releases/download/v3.0.2/protoc-3.0.2-linux-x86_64.zip ;
unzip protoc.zip ;
export PATH=`pwd`/bin/:$PATH ;
protoc --version ;
cd .. ;;
esac
script:
- bazel build --show_result=100 ...
- case "$BUILD" in
"BAZEL")
bazel build --show_result=100 ... ;;
"MVN")
mvn verify ;;
*)
echo "Missing case $BUILD" ;
exit 1 ;;
esac

@ -38,6 +38,9 @@
<configuration>
<protocExecutable>protoc</protocExecutable>
<protoSourceRoot>.</protoSourceRoot>
<includes>
<include>stats/*.proto</include>
</includes>
</configuration>
<executions>
<execution>

Loading…
Cancel
Save