mirror of https://github.com/apache/druid.git
Speedup package check job (#8282)
The package check job sometimes hits the 50 minute Travis CI job time limit. Move license checking tasks in "package check" job to "license check" job to rebalance the job runtime (the "license check" job currently takes about 1 minute). Moving the logic from build.sh to .travis.yml also gives more visibility into how long each step takes (i.e., generate-license-dependency-reports.py vs generate-license.py).
This commit is contained in:
parent
6b4d028b96
commit
ccd87d2667
30
.travis.yml
30
.travis.yml
|
@ -44,7 +44,7 @@ env:
|
|||
# Add various options to make 'mvn install' fast and skip javascript compile (-Ddruid.console.skip=true) since it is not
|
||||
# needed. Depending on network speeds, "mvn -q install" may take longer than the default 10 minute timeout to print any
|
||||
# output. To compensate, use travis_wait to extend the timeout.
|
||||
install: MAVEN_OPTS='-Xmx3000m' travis_wait 15 $MVN clean install -q -ff ${MAVEN_SKIP} -DskipTests -T1.0C
|
||||
install: MAVEN_OPTS='-Xmx3000m' travis_wait 15 $MVN clean install -q -ff ${MAVEN_SKIP} -DskipTests -T1C
|
||||
|
||||
matrix:
|
||||
include:
|
||||
|
@ -72,10 +72,20 @@ matrix:
|
|||
|
||||
- name: "license checks"
|
||||
install: skip
|
||||
script: >
|
||||
$MVN apache-rat:check -Prat --fail-at-end
|
||||
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
-Drat.consoleOutput=true
|
||||
before_script: &setup_generate_license
|
||||
- sudo apt-get update && sudo apt-get install python3 python3-pip python3-setuptools -y
|
||||
- pip3 install wheel # install wheel first explicitly
|
||||
- pip3 install pyyaml
|
||||
script:
|
||||
- >
|
||||
$MVN apache-rat:check -Prat --fail-at-end
|
||||
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
-Drat.consoleOutput=true
|
||||
# Generate dependency reports and checks they are valid. When running on Travis CI, 2 cores are available
|
||||
# (https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system).
|
||||
- mkdir -p target
|
||||
- docs/_bin/generate-license-dependency-reports.py . target --clean-maven-artifact-transfer --parallel 2
|
||||
- docs/_bin/generate-license.py licenses/APACHE2 licenses.yaml LICENSES.BINARY --dependency-reports target/license-reports
|
||||
|
||||
- name: "strict compilation"
|
||||
install: skip
|
||||
|
@ -85,11 +95,11 @@ matrix:
|
|||
-pl '!benchmarks' ${MAVEN_SKIP} -DskipTests
|
||||
|
||||
- name: "packaging check"
|
||||
before_script:
|
||||
- sudo apt-get update && sudo apt-get install python3 python3-pip python3-setuptools -y
|
||||
- pip3 install wheel # install wheel first explicitly
|
||||
- pip3 install pyyaml
|
||||
script: ./build.sh
|
||||
install: skip
|
||||
before_script: *setup_generate_license
|
||||
script: >
|
||||
MAVEN_OPTS='-Xmx3000m' $MVN clean install -Pdist -Pbundle-contrib-exts --fail-at-end
|
||||
-pl '!benchmarks' ${MAVEN_SKIP} -DskipTests -Ddruid.console.skip=false -T1C
|
||||
|
||||
- name: "processing module test"
|
||||
env: &processing_env
|
||||
|
|
40
build.sh
40
build.sh
|
@ -1,40 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
# 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.
|
||||
|
||||
MAVEN_OPTS='-Xmx3000m'
|
||||
|
||||
mkdir -p target
|
||||
|
||||
# Generate dependency reports and checks they are valid. When running on Travis CI, 2 cores are available
|
||||
# (https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system).
|
||||
docs/_bin/generate-license-dependency-reports.py . target --clean-maven-artifact-transfer --parallel 2
|
||||
|
||||
docs/_bin/generate-license.py licenses/APACHE2 licenses.yaml LICENSES.BINARY --dependency-reports target/license-reports
|
||||
|
||||
# Build binary distribution. Note that the below command internally runs 'docs/_bin/generate-license.py' without license
|
||||
# check which overwrites LICENSES.BINARY file generated by the above command. This must be fine since both commands are
|
||||
# supposed to generate the same contents.
|
||||
mvn -B --fail-at-end install -Pdist -Pbundle-contrib-exts \
|
||||
-pl '!benchmarks' \
|
||||
-Danimal.sniffer.skip=true \
|
||||
-Dcheckstyle.skip=true \
|
||||
-Denforcer.skip=true \
|
||||
-Dforbiddenapis.skip=true \
|
||||
-Dmaven.javadoc.skip=true \
|
||||
-Dpmd.skip=true \
|
||||
-DskipTests \
|
||||
-Dspotbugs.skip=true \
|
||||
-T1.0C
|
Loading…
Reference in New Issue