Skip to content

Commit

Permalink
ci: do not use CI java
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
easye committed Mar 18, 2024
1 parent a20802a commit 01a617d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/abcl-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 18 additions & 0 deletions ci/install-ant.bash
Original file line number Diff line number Diff line change
@@ -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"



0 comments on commit 01a617d

Please sign in to comment.