Skip to content

Commit

Permalink
infra: fix Travis problem with JAVA_HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
romani authored and nrmancuso committed Aug 8, 2023
1 parent f32bc1f commit eb0f3f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 66 deletions.
38 changes: 0 additions & 38 deletions .ci/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,44 +31,6 @@ init-m2-repo)
fi
;;

install-adoptium-jdk)
if [[ -n "${CUSTOM_ADOPTIUM_JDK}" ]]; then
echo "Installing ${CUSTOM_ADOPTIUM_JDK}...";
curl --fail-with-body -s https://packages.adoptium.net/artifactory/api/gpg/key/public |
sudo tee /usr/share/keyrings/adoptium.asc
echo "deb [signed-by=/usr/share/keyrings/adoptium.asc] \
https://packages.adoptium.net/artifactory/deb $(lsb_release --short --codename) main" |
sudo tee /etc/apt/sources.list.d/adoptium.list
sudo apt-get update
sudo apt-get install "${CUSTOM_ADOPTIUM_JDK}"
fi
;;

remove-adoptium-jdk)
if [[ -n "${CUSTOM_ADOPTIUM_JDK}" ]]; then
sudo apt-get remove "${CUSTOM_ADOPTIUM_JDK}"
fi
;;

install-custom-mvn)
if [[ -n "${CUSTOM_MVN_VERSION}" ]]; then
echo "Download Maven ${CUSTOM_MVN_VERSION}....";
URL="https://archive.apache.org/dist/maven/maven-3/"
URL=$URL"${CUSTOM_MVN_VERSION}/binaries/apache-maven-${CUSTOM_MVN_VERSION}-bin.zip"
wget --progress=dot:giga "$URL"
unzip -q apache-maven-"${CUSTOM_MVN_VERSION}"-bin.zip
export M2_HOME=$PWD/apache-maven-${CUSTOM_MVN_VERSION};
export PATH=$M2_HOME/bin:$PATH;
fi
;;

remove-custom-mvn)
if [[ -n "${CUSTOM_MVN_VERSION}" ]]; then
rm apache-maven-"${CUSTOM_MVN_VERSION}"-bin.zip
rm -rf apache-maven-"${CUSTOM_MVN_VERSION}"
fi
;;

run-command)
if [[ $RUN_JOB == 1 ]]; then
echo "eval of CMD is starting";
Expand Down
28 changes: 8 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ before_install:
- sudo apt update

install:
- sudo apt install -y groovy xsltproc xmlstarlet ant
- ./.ci/travis.sh install-adoptium-jdk
- ./.ci/travis.sh install-custom-mvn
- sudo apt install -y xmlstarlet

jobs:
fast_finish: true
Expand All @@ -36,27 +34,17 @@ jobs:
- USE_MAVEN_REPO="true"

before_script:
# - |
# if [[ $TRAVIS_CPU_ARCH == 'ppc64le' ]]; then
# export JAVA_HOME=/usr/lib/jvm/adoptopenjdk-11-hotspot-ppc64el
# export PATH=$JAVA_HOME/bin:$PATH
# fi
- java --version

script:
# manually set JAVA_HOME to overcome issue with travis ci noted at
# https://github.com/checkstyle/checkstyle/pull/11699#issue-1261272652
# - JAVA_HOME='/usr/lib/jvm/adoptopenjdk-11-hotspot-ppc64el'
# - ./.ci/travis.sh init-m2-repo
# - ./.ci/travis.sh run-command "$CMD"
# - ./.ci/travis.sh remove-custom-mvn
# - ./.ci/travis.sh remove-adoptium-jdk
# - ./.ci/validation.sh git-diff
# - ./.ci/validation.sh ci-temp-check
# - ./.ci/travis.sh quarterly-cache-cleanup
- ./.ci/travis.sh init-m2-repo
- ./.ci/travis.sh run-command "$CMD"
- ./.ci/validation.sh git-diff
- ./.ci/validation.sh ci-temp-check
- ./.ci/travis.sh quarterly-cache-cleanup
- sleep 5s

after_success:
# - ./.ci/travis.sh run-command-after-success
# - ./.ci/travis.sh deploy-snapshot
- ./.ci/travis.sh run-command-after-success
- ./.ci/travis.sh deploy-snapshot
- sleep 5s
8 changes: 0 additions & 8 deletions config/jsoref-spellchecker/whitelist.words
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ actionlint
addons
adf
admins
adoptium
adoptopenjdk
adr
AFilter
aggregators
Expand Down Expand Up @@ -56,8 +54,6 @@ Arquillian
arraycopy
arraytrailingcomma
arraytypestyle
artifactory
asc
asda
ASF
Aspectj
Expand Down Expand Up @@ -228,7 +224,6 @@ codeclimate
codeconventions
codecov
codehaus
codename
codenarc
codeql
codeselectorpresentation
Expand Down Expand Up @@ -549,7 +544,6 @@ hne
homepage
horizontalwhitespace
Hostname
hotspot
href
htaccess
htag
Expand Down Expand Up @@ -742,7 +736,6 @@ kclee
KDoc
keygen
keyname
keyrings
keyscan
konstantinos
Kordas
Expand Down Expand Up @@ -782,7 +775,6 @@ lombok
lookaround
Loughran
lparen
lsb
lucene
lui
luiframework
Expand Down

0 comments on commit eb0f3f5

Please sign in to comment.