pmd/.ci/build-pr-win-macos.sh

40 lines
1002 B
Bash
Raw Normal View History

2020-11-12 13:11:56 +01:00
#!/usr/bin/env bash
source $(dirname $0)/inc/logger.inc
source $(dirname $0)/inc/install-openjdk.inc
2020-11-12 13:11:56 +01:00
source $(dirname $0)/inc/regression-tester.inc
source $(dirname $0)/inc/maven-dependencies.inc
2020-11-12 13:11:56 +01:00
set -e
log_group_start "Installing Java"
2020-11-14 19:35:13 +01:00
log_info "Install openjdk11 as default"
2020-11-13 20:34:37 +01:00
install_openjdk_setdefault 11
PMD_EXTRA_OPT=""
if [[ "$(uname)" == Linux* ]]; then
2020-11-14 20:34:49 +01:00
log_info "Install openjdk8 for integration tests and pmd-regression-tests"
install_openjdk 8
PMD_EXTRA_OPT="-Djava8.home=${HOME}/openjdk8"
fi
2020-11-13 20:34:37 +01:00
log_group_end
log_group_start "Downloading maven dependencies"
maven_dependencies_resolve
log_group_end
2020-11-13 14:44:39 +01:00
log_group_start "Building with maven"
./mvnw -e -V clean verify ${PMD_EXTRA_OPT}
2020-11-13 14:44:39 +01:00
log_group_end
2020-11-12 13:11:56 +01:00
# Danger is executed only on the linux runner
case "$(uname)" in
Linux*)
2020-11-13 14:44:39 +01:00
log_group_start "Executing danger"
2020-11-13 20:34:37 +01:00
regression_tester_setup_ci
regression_tester_executeDanger
2020-11-13 14:44:39 +01:00
log_group_end
2020-11-12 13:11:56 +01:00
;;
esac