Skip to content

Commit

Permalink
[KYUUBI #742] [BUILD] Enhance build/mvn in CI mode
Browse files Browse the repository at this point in the history
<!--
Thanks for sending a pull request!

Here are some tips for you:
  1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
  2. If the PR is related to an issue in https://github.com/NetEase/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
  3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->

### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
  1. If you add a feature, you can talk about the use case of it.
  2. If you fix a bug, you can clarify why it is a bug.
-->
Enable mvn cli options `--batch-mode` `--no-transfer-progress` in CI mode to suppress noising logs.

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request

Closes #742 from pan3793/mvn.

Closes #742

79d8901 [Cheng Pan] --no-transfer-progress
218852a [Cheng Pan] fix syntax
309e45b [Cheng Pan] MAVEN_CLI_OPTS
44907b6 [Cheng Pan] [BUILD] Enhance build/mvn in CI mode

Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
  • Loading branch information
pan3793 authored and yaooqinn committed Jul 3, 2021
1 parent af3f858 commit 65996a4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 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
6 changes: 5 additions & 1 deletion build/mvn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ _DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Preserve the calling directory
_CALLING_DIR="$(pwd)"

if [ "$CI" ]; then
export MAVEN_CLI_OPTS="--batch-mode --no-transfer-progress --errors --fail-fast"
fi

# Installs any application tarball given a URL, the expected tarball name,
# and, optionally, a checkable binary path to determine if the binary has
# already been installed
Expand Down Expand Up @@ -105,4 +109,4 @@ install_mvn

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

0 comments on commit 65996a4

Please sign in to comment.