Commit a08759a3 authored by Mark Evenson's avatar Mark Evenson Committed by GitHub

Merge pull request #121 from easye/easye/ci-20191124aa

Easye/ci 20191124aa
parents 199dcd81 f092c9c1
# get the default java environment from Travis container
language: java
os:
- linux
- osx
# Linux system
dist: xenial
# 'bionic' is latest Ubuntu LTS available on Travis
dist: bionic
# macOS system
# 'xcode11.2' is macOS 10.14 xcode 11B41
osx_image: xcode11.2
# get the default java environment from Travis container
language: java
# N.b. this will possibly pull in additional Java runtimes
addons:
apt:
packages:
- ant
- maven
homebrew:
update: true
packages:
- ant
- maven
env:
- ABCL_JDK=openjdk8
- ABCL_JDK=openjdk11
......@@ -20,7 +32,7 @@ install:
- echo $(pwd)
- bash -x ${TRAVIS_BUILD_DIR}/ci/install-adoptjdk.bash ${ABCL_JDK}
# Build ABCL
- ant abcl
- . ${TRAVIS_BUILD_DIR}/ci/ensure-jenv-is-present.bash && ant abcl
# Configure finding abcl build source via ASDF
- bash -x ${TRAVIS_BUILD_DIR}/ci/asdf-finds-abcl.bash
# Install Quicklisp
......
if [[ $(echo $PATH | grep -c .jenv) -eq 0 ]]; then
export PATH="$HOME/.jenv/bin:$PATH"
fi
eval "$(jenv init -)"
#!/usr/bin/env bash
DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source ${DIR}/install-jenv.bash
. ${DIR}/install-jenv.bash
jdk=$1
if [[ -z $jdk ]]; then
jdk=openjdk8
fi
# empty variables are not necessary, but a hint that these are not
# lexically scoped in their modification.
......@@ -40,7 +43,6 @@ function determine_adoptjdk() {
esac
}
tmpdir=/var/tmp
function download_and_extract() {
......@@ -64,31 +66,16 @@ function add_jdk() {
esac
}
function set_jdk() {
jenv versions
determine_adoptjdk
download_and_extract
add_jdk
case ${ABCL_JDK} in
openjdk8)
version=$(jenv versions | grep openjdk | grep 1.8 | tail -1 | sed s/*//)
;;
openjdk11)
version=$(jenv versions | grep openjdk | grep 11.0 | tail -1 | sed s/*//)
;;
esac
. ${DIR}/set-jdk.bash
pushd ${TRAVIS_BUILD_DIR}
jenv doctor
jenv local ${version}
# but practically we guard every invocation of jenv this way
jenv global ${version}
popd
}
determine_adoptjdk
download_and_extract
add_jdk
set_jdk
......
#!/usr/bin/env bash
DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
target=~/.jenv
......@@ -6,14 +7,11 @@ if [[ ! -r "${target}" ]]; then
git clone https://github.com/jenv/jenv.git "${target}"
fi
# FIXME: don't always run the init routines?
profile=~/.bash_profile
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ${profile}
echo 'eval "$(jenv init -)"' >> ${profile}
. ${profile}
. ${DIR}/ensure-jenv-is-present.bash
jenv enable-plugin ant
jenv enable-plugin maven
jenv enable-plugin export
jenv doctor
......
function set_jdk() {
abcl_jdk=$1
if [[ -z ${abcl_jdk} ]]; then
abcl_jdk=openjdk8
fi
dir=$1
if [[ -z ${dir} ]]; then
dir=${TRAVIS_BUILD_DIR}
fi
. ${DIR}/ensure-jenv-is-present.bash
jenv versions
case ${abcl_jdk} in
openjdk8)
version=$(jenv versions | grep openjdk | grep 1.8 | tail -1 | sed s/*//)
;;
openjdk11)
version=$(jenv versions | grep openjdk | grep 11.0 | tail -1 | sed s/*//)
;;
esac
if [[ -z ${version} ]]; then
version=$(jenv versions | tail -1 | sed s/*//)
fi
if [[ -z ${version} ]]; then
version=1.8
fi
pushd ${dir}
jenv local ${version}
# but practically we guard every invocation of jenv this way
jenv global ${version}
jenv version
popd
}
set_jdk ${ABCL_JDK} ${TRAVIS_BUILD_DIR}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment