From cc9f234fd51493684767c854fc52d0fba7856496 Mon Sep 17 00:00:00 2001 From: JJ Date: Thu, 29 Jun 2017 17:43:58 -0500 Subject: [PATCH 1/4] METRON-1008: Updating travis to use trusty, increase heap, and added .npm to cache. Added some more cacheing from 1004 ticket. Revert some changes. Reverted environment and put maven opts in the correct spot. Testing sudo as false. Trying multiple vm build. Revert back to two threads on maven install. --- .travis.sh | 32 ++++++++++++++++++++++++++++++++ .travis.yml | 38 +++++++++++++++++++++++++++++++++----- 2 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 .travis.sh diff --git a/.travis.sh b/.travis.sh new file mode 100644 index 0000000000..3ac86d077d --- /dev/null +++ b/.travis.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +case ${TEST_TYPE} in +integration) + time mvn -q surefire:test@integration-tests + ;; +unit) + time mvn -q -T 2C surefire:test@unit-tests + ;; +ui) + time mvn -q test --projects metron-interface/metron-config + ;; +*) + exit 1 + ;; +esac \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 97a816c36f..a41d1d92e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,33 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dist: trusty +sudo: required + env: - - CXX=g++-4.8 + - TEST_TYPE=integration + - TEST_TYPE=unit + - TEST_TYPE=ui + addons: apt: sources: - ubuntu-toolchain-r-test packages: - g++-4.8 -sudo: required install: true language: java jdk: @@ -16,11 +37,17 @@ before_install: - unzip -qq apache-maven-3.3.9-bin.zip - export M2_HOME=$PWD/apache-maven-3.3.9 - export PATH=$M2_HOME/bin:$PATH - - npm config set cache $HOME/.npm-cache --global + - export MAVEN_OPTS="-Xmx2g" + - npm config set cache $HOME/.npm-cache --global - npm config set prefix $HOME/.npm-prefix --global + - time build_utils/verify_licenses.sh + +install: + - time mvn -q -T 2C -DskipTests clean install + script: - - | - time mvn -q -T 2C -DskipTests install && time mvn -q -T 2C surefire:test@unit-tests && time mvn -q surefire:test@integration-tests && time mvn -q test --projects metron-interface/metron-config && time build_utils/verify_licenses.sh + - bash .travis.sh + before_cache: - rm -rf $HOME/.m2/repository/org/apache/metron @@ -31,3 +58,4 @@ cache: - $HOME/.npm-prefix - metron-interface/metron-config/node_modules - $HOME/.m2 + - $HOME/.npm From a2a07df29f048cbf35c5f85d83073c2d776d93d8 Mon Sep 17 00:00:00 2001 From: JJ Date: Wed, 5 Jul 2017 13:51:17 -0500 Subject: [PATCH 2/4] Properly setting MAVEN_OPTS. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a41d1d92e8..cdc5467bc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ before_install: - unzip -qq apache-maven-3.3.9-bin.zip - export M2_HOME=$PWD/apache-maven-3.3.9 - export PATH=$M2_HOME/bin:$PATH - - export MAVEN_OPTS="-Xmx2g" + - echo "MAVEN_OPTS='-Xmx2g'" > ~/.mavenrc - npm config set cache $HOME/.npm-cache --global - npm config set prefix $HOME/.npm-prefix --global - time build_utils/verify_licenses.sh From 6587c0a3c469267b6fb20864b4ea16068b127e68 Mon Sep 17 00:00:00 2001 From: JJ Date: Wed, 5 Jul 2017 14:43:05 -0500 Subject: [PATCH 3/4] Testing if we can remove g++ addon. --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index cdc5467bc3..4cfe0303ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,12 +22,12 @@ env: - TEST_TYPE=unit - TEST_TYPE=ui -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 +#addons: +# apt: +# sources: +# - ubuntu-toolchain-r-test +# packages: +# - g++-4.8 install: true language: java jdk: From 0558d888ef14103c16caaea24b7cf5ef871f9935 Mon Sep 17 00:00:00 2001 From: JJ Date: Wed, 5 Jul 2017 15:05:51 -0500 Subject: [PATCH 4/4] Removing g++ addon as it seems to work without this. --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4cfe0303ae..b6c4de6d59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,12 +22,6 @@ env: - TEST_TYPE=unit - TEST_TYPE=ui -#addons: -# apt: -# sources: -# - ubuntu-toolchain-r-test -# packages: -# - g++-4.8 install: true language: java jdk: