Skip to content

Commit

Permalink
[BUILD] Enhance build/mvn in CI mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pan3793 committed Jul 3, 2021
1 parent 902b4b1 commit 44907b6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-io-
- name: Build with Maven
run: mvn clean install --no-transfer-progress ${{ matrix.profiles }} -Dmaven.javadoc.skip=true -V
run: ./build/mvn clean install ${{ matrix.profiles }} -Dmaven.javadoc.skip=true -V
- name: Code coverage
if: ${{ matrix.profiles == '' }}
run: bash <(curl -s https://codecov.io/bash)
Expand Down Expand Up @@ -121,5 +121,5 @@ jobs:
${{ runner.os }}-maven-io-
- name: Run TPC-DS Tests
run: |
mvn clean install --no-transfer-progress -Pspark-3.1 -DskipTests -pl :kyuubi-spark-sql-engine,:kyuubi-common,:kyuubi-ha,:kyuubi-zookeeper
mvn test --no-transfer-progress -Pspark-3.1 -Dtest=none -DwildcardSuites=org.apache.kyuubi.operation.tpcds -Dmaven.plugin.scalatest.exclude.tags=''
./build/mvn clean install -Pspark-3.1 -DskipTests -pl :kyuubi-spark-sql-engine,:kyuubi-common,:kyuubi-ha,:kyuubi-zookeeper
./build/mvn test -Pspark-3.1 -Dtest=none -DwildcardSuites=org.apache.kyuubi.operation.tpcds -Dmaven.plugin.scalatest.exclude.tags=''
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-io-
- name: Build with Maven
run: mvn clean install --no-transfer-progress ${{ matrix.profiles }} -Dmaven.javadoc.skip=true -V
run: ./build/mvn clean install ${{ matrix.profiles }} -Dmaven.javadoc.skip=true -V
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v2
Expand Down
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ matrix:
- JOB="tpcds-tests"

install:
- mvn --version
- ./build/mvn --version

script:
- |
if [[ "$TRAVIS_EVENT_TYPE" != "cron" && "$JOB" == "build" ]]; then
mvn clean install --no-transfer-progress $PROFILE -Dmaven.javadoc.skip=true -V
./build/mvn clean install $PROFILE -Dmaven.javadoc.skip=true -V
fi
- |
if [[ "$TRAVIS_EVENT_TYPE" == "cron" && "$JOB" == "nightly-build" ]]; then
mvn clean install --no-transfer-progress $PROFILE -pl :kyuubi-spark-sql-engine,:kyuubi-common,:kyuubi-ha,:kyuubi-zookeeper -Dmaven.javadoc.skip=true -V
./build/mvn clean install $PROFILE -pl :kyuubi-spark-sql-engine,:kyuubi-common,:kyuubi-ha,:kyuubi-zookeeper -Dmaven.javadoc.skip=true -V
fi
- |
if [[ "$TRAVIS_EVENT_TYPE" != "cron" && "$JOB" == "tpcds-tests" ]]; then
mvn clean install --no-transfer-progress $PROFILE -DskipTests -pl :kyuubi-spark-sql-engine,:kyuubi-common,:kyuubi-ha,:kyuubi-zookeeper
mvn test --no-transfer-progress $PROFILE -Dtest=none -DwildcardSuites=org.apache.kyuubi.operation.tpcds
./build/mvn clean install $PROFILE -DskipTests -pl :kyuubi-spark-sql-engine,:kyuubi-common,:kyuubi-ha,:kyuubi-zookeeper
./build/mvn test $PROFILE -Dtest=none -DwildcardSuites=org.apache.kyuubi.operation.tpcds
fi
after_success:
Expand Down
8 changes: 8 additions & 0 deletions build/mvn
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Preserve the calling directory
_CALLING_DIR="$(pwd)"
# Options used during compilation
_COMPILE_JVM_OPTS="-Xmx1g"
if [ "$CI" ]; then
_COMPILE_JVM_OPTS="${_COMPILE_JVM_OPTS} --batch-mode --no-transfer-progress"
fi

# Installs any application tarball given a URL, the expected tarball name,
# and, optionally, a checkable binary path to determine if the binary has
Expand Down Expand Up @@ -103,6 +108,9 @@ install_scala() {
install_scala
install_mvn

# Set any `mvn` options if not already present
export MAVEN_OPTS=${MAVEN_OPTS:-"$_COMPILE_JVM_OPTS"}

cd "${_CALLING_DIR}"
echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
${MVN_BIN} "$@"

0 comments on commit 44907b6

Please sign in to comment.