From 01a617dcfd64b444eacc5b5121f943303f571ecd Mon Sep 17 00:00:00 2001 From: Mark Evenson Date: Mon, 18 Mar 2024 07:31:29 +0100 Subject: [PATCH] ci: do not use CI java It used to be that with GitHub actions/setup-java@v1 we could Ant installed but use jenv to use our "own" openjdk to run it. Something changed, debugging the GitHub CI via multiple pull requests is tedious, so just try to use GitHub for any dependencies beyond bash. --- .github/workflows/abcl-test.yml | 14 ++++++++------ ci/install-ant.bash | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 ci/install-ant.bash diff --git a/.github/workflows/abcl-test.yml b/.github/workflows/abcl-test.yml index b756cb7fd..c1fc8486b 100644 --- a/.github/workflows/abcl-test.yml +++ b/.github/workflows/abcl-test.yml @@ -20,18 +20,20 @@ jobs: - name: Clone ABCL uses: actions/checkout@v4 - - - name: Install Java base for Ant - uses: actions/setup-java@v1 - with: - java-version: '8' - name: Install jenv - run: bash -x ./ci/install-jenv.bash + run: | + bash -x ./ci/install-jenv.bash + echo ~/.jenv/bin >> $GITHUB_PATH - name: Install OpenJDK run: bash -x ./ci/install-openjdk.bash ${JDK_VERSION} + - name: Install Ant + run: | + bash -x ./ci/install-ant.bash + echo ~/.local/share/java/apache-ant/bin >> $GITHUB_PATH + - name: Ensure we are using the correct JDK run: bash -x ./ci/ensure-jenv-is-present.bash && ant abcl.diagnostic diff --git a/ci/install-ant.bash b/ci/install-ant.bash new file mode 100644 index 000000000..3b63008db --- /dev/null +++ b/ci/install-ant.bash @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + + +tmpdir=/tmp +pushd "${tmpdir}" +ant_base=apache-ant-1.10.14 +wget https://www-eu.apache.org/dist/ant/binaries/${ant_base}-bin.zip +unzip ${tmpdir}/${ant_base}-bin.zip +popd + +install_dir="$HOME/.local/share/java" +mkdir -p "${install_dir}" +mv ${tmpdir}/${ant_base} "${install_dir}/apache-ant" + +echo Ant binary installed in "${install_dir}/apache-ant/bin" + + +