mirror of https://github.com/apache/druid.git
160 lines
6.1 KiB
YAML
160 lines
6.1 KiB
YAML
# 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.
|
|
|
|
language: java
|
|
|
|
# On 12-12-2017, Travis updated their trusty image, which caused integration tests to fail.
|
|
# The group: config instructs Travis to use the previous trusty image.
|
|
# Please see https://github.com/apache/incubator-druid/pull/5155 for more information.
|
|
sudo: false
|
|
dist: trusty
|
|
group: deprecated-2017Q4
|
|
|
|
jdk:
|
|
- openjdk8
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.m2
|
|
|
|
matrix:
|
|
include:
|
|
# Java 11 build
|
|
- jdk: openjdk11
|
|
|
|
# license checks
|
|
- env:
|
|
- NAME="license checks"
|
|
install: true
|
|
script: MAVEN_OPTS='-Xmx3000m' mvn clean verify -Prat -DskipTests -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Drat.consoleOutput=true
|
|
|
|
# strict compilation
|
|
- env:
|
|
- NAME="strict compilation"
|
|
install: true
|
|
# Strict compilation requires more than 2 GB
|
|
script: MAVEN_OPTS='-Xmx3000m' mvn clean -Pstrict -pl '!benchmarks' compile test-compile spotbugs:check -B --fail-at-end
|
|
|
|
# packaging check
|
|
- env:
|
|
- NAME="packaging check"
|
|
install: true
|
|
script: MAVEN_OPTS='-Xmx3000m' mvn -DskipTests -Dforbiddenapis.skip=true -Dcheckstyle.skip=true -Dpmd.skip=true -Dmaven.javadoc.skip=true -pl '!benchmarks' -B --fail-at-end clean install -Pdist
|
|
|
|
# processing module test
|
|
- env:
|
|
- NAME="processing module test"
|
|
install: MAVEN_OPTS='-Xmx3000m' mvn install -q -ff -DskipTests -B
|
|
before_script: unset _JAVA_OPTIONS
|
|
script:
|
|
# Set MAVEN_OPTS for Surefire launcher
|
|
- MAVEN_OPTS='-Xmx512m' mvn test -B -pl processing
|
|
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0"
|
|
- free -m
|
|
|
|
# processing module tests with SQL Compatibility enabled
|
|
- env:
|
|
- NAME="processing module test with SQL Compatibility"
|
|
install: MAVEN_OPTS='-Xmx3000m' mvn install -q -ff -DskipTests -B
|
|
before_script: unset _JAVA_OPTIONS
|
|
script:
|
|
# Set MAVEN_OPTS for Surefire launcher
|
|
- MAVEN_OPTS='-Xmx512m' mvn test -B -Ddruid.generic.useDefaultValueForNull=false -pl processing
|
|
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0"
|
|
- free -m
|
|
|
|
# server module test
|
|
- env:
|
|
- NAME="server module test"
|
|
install: MAVEN_OPTS='-Xmx3000m' mvn install -q -ff -DskipTests -B
|
|
before_script: unset _JAVA_OPTIONS
|
|
script:
|
|
# Set MAVEN_OPTS for Surefire launcher
|
|
- MAVEN_OPTS='-Xmx512m' mvn test -B -pl server
|
|
|
|
# server module test with SQL Compatibility enabled
|
|
- env:
|
|
- NAME="server module test with SQL Compatibility enabled"
|
|
install: MAVEN_OPTS='-Xmx3000m' mvn install -q -ff -DskipTests -B
|
|
before_script: unset _JAVA_OPTIONS
|
|
script:
|
|
# Set MAVEN_OPTS for Surefire launcher
|
|
- MAVEN_OPTS='-Xmx512m' mvn test -B -pl server -Ddruid.generic.useDefaultValueForNull=false
|
|
|
|
|
|
# other modules test
|
|
- env:
|
|
- NAME="other modules test"
|
|
install: MAVEN_OPTS='-Xmx3000m' mvn install -q -ff -DskipTests -B
|
|
before_script: unset _JAVA_OPTIONS
|
|
script:
|
|
# Set MAVEN_OPTS for Surefire launcher
|
|
- MAVEN_OPTS='-Xmx512m' mvn test -B -pl '!processing,!server'
|
|
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0"
|
|
- free -m
|
|
|
|
# other modules test with SQL Compatibility enabled
|
|
- env:
|
|
- NAME="other modules test with SQL Compatibility"
|
|
install: MAVEN_OPTS='-Xmx3000m' mvn install -q -ff -DskipTests -B
|
|
before_script: unset _JAVA_OPTIONS
|
|
script:
|
|
# Set MAVEN_OPTS for Surefire launcher
|
|
- MAVEN_OPTS='-Xmx512m' mvn test -B -Ddruid.generic.useDefaultValueForNull=false -pl '!processing,!server'
|
|
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0"
|
|
- free -m
|
|
|
|
# run integration tests
|
|
- sudo: required
|
|
services:
|
|
- docker
|
|
env:
|
|
- NAME="integration test part 1"
|
|
- DOCKER_IP=127.0.0.1
|
|
install:
|
|
# Only errors will be shown with the -q option. This is to avoid generating too many logs which make travis build failed.
|
|
- mvn install -q -ff -DskipTests -B
|
|
script:
|
|
- $TRAVIS_BUILD_DIR/ci/travis_script_integration.sh
|
|
after_failure:
|
|
- for v in ~/shared/logs/*.log ; do
|
|
echo $v logtail ======================== ; tail -100 $v ;
|
|
done
|
|
- for v in broker middlemanager overlord router coordinator historical ; do
|
|
echo $v dmesg ======================== ;
|
|
docker exec -it druid-$v sh -c 'dmesg | tail -3' ;
|
|
done
|
|
|
|
# run integration tests
|
|
- sudo: required
|
|
services:
|
|
- docker
|
|
env:
|
|
- NAME="integration test part 2"
|
|
- DOCKER_IP=127.0.0.1
|
|
install:
|
|
# Only errors will be shown with the -q option. This is to avoid generating too many logs which make travis build failed.
|
|
- mvn install -q -ff -DskipTests -B
|
|
script:
|
|
- $TRAVIS_BUILD_DIR/ci/travis_script_integration_part2.sh
|
|
after_failure:
|
|
- for v in ~/shared/logs/*.log ; do
|
|
echo $v logtail ======================== ; tail -100 $v ;
|
|
done
|
|
- for v in broker middlemanager overlord router coordinator historical ; do
|
|
echo $v dmesg ======================== ;
|
|
docker exec -it druid-$v sh -c 'dmesg | tail -3' ;
|
|
done
|