Commit 44d63a69 authored by Mark Evenson's avatar Mark Evenson
Browse files

ci: use adoptjdk for both macos and linux

Speculative if this works.
parent 4a153bf0
language: java
os:
- linux
- osx
......@@ -11,17 +9,17 @@ dist: xenial
# 'xcode11.2' is macOS 10.14 xcode 11B41
osx_image: xcode11.2
jdk:
- openjdk8
- openjdk11
# get the default java environment from Travis container
language: java
# WARN Don't mix comments with nested YML, as it gets confused easily (or I do…)
# 1. Compile ABCL
# 2. Hopefully use cffi master from Quicklisp
# 3. Speculatively fetch the ANSI-TEST master
jobs:
include:
- env: ABCL_JDK=openjdk8
- env: ABCL_JDK=openjdk11
install:
- echo $(pwd)
- bash -x ${TRAVIS_BUILD_DIR}/install-adoptjdk.bash ${ABCL_JDK}
# Build ABCL
- ant abcl
# Configure finding abcl build source via ASDF
......@@ -33,10 +31,8 @@ install:
# Install ANSI tests
- mkdir -p ../ansi-test && cd .. && git clone https://gitlab.common-lisp.net/ansi-test/ansi-test && cd ansi-test && git show-ref && git rev-parse
# TODO: figure out how to add abcl to out path
# TODO: figure out how to add abcl to our path
# 1. Test CFFI
# 2. Test CL+SSL
script:
- ${TRAVIS_BUILD_DIR}/abcl --batch --load ${TRAVIS_BUILD_DIR}/ci/test-cffi.lisp
- ${TRAVIS_BUILD_DIR}/abcl --batch --load ${TRAVIS_BUILD_DIR}/ci/test-cl+ssl.lisp
......
#!/usr/bin/env bash
DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source ${DIR}/install-jenv.bash
jdk=$1
# empty variables are not necessary, but a hint that these are not
# lexically scoped in their modification.
topdir=
dist=
function determine_adoptjdk() {
case $(uname) in
Darwin)
case $jdk in
openjdk8)
topdir=jdk8u232-b09
dist="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_mac_hotspot_8u232b09.tar.gz"
;;
openjdk11)
topdir=jdk-11.0.5+10
dist="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.5_10.tar.gz"
;;
esac
;;
Linux)
case $jdk in
openjdk8)
topdir=jdk8u232-b09
dist="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/${topdir}/OpenJDK8U-jdk_x64_linux_hotspot_8u232b09.tar.gz"
;;
openjdk11)
topdir=jdk-11.0.5+10
dist="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.5_10.tar.gz"
;;
esac
;;
*)
echo No known dist for $(uname)
esac
}
tmpdir=/var/tmp
function download_and_extract() {
pushd ${tmpdir} && wget --continue ${dist}
tar xvz -f $(basename ${dist})
popd
}
function add_jdk() {
echo $dist
echo $tmpdir
case $(uname) in
Darwin)
jenv add ${tmpdir}/${topdir}/Contents/Home
;;
Linux)
jenv add ${tmpdir}/${topdir}
;;
esac
}
determine_adoptjdk
download_and_extract
add_jdk
#!/usr/bin/env bash
target=~/.jenv
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}
jenv doctor
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