From 6503031233422f01bd337214cfda38031d621286 Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Thu, 27 Jun 2024 20:39:12 +0200 Subject: [PATCH] Report GNAT in use 1st hand --- action.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 898a3898..e312dc94 100644 --- a/action.yml +++ b/action.yml @@ -50,8 +50,8 @@ runs: id: cache-key shell: bash run: | - echo "key=alr[${{ steps.find-hash.outputs.version }}][${{ inputs.toolchain }}][${{ runner.os }}][${{ steps.find-hash.outputs.hash }}][f]" >> $GITHUB_OUTPUT - # The last value in square brackets is to make the key unique for debugging + echo "key=alr[1][${{ steps.find-hash.outputs.version }}][${{ inputs.toolchain }}][${{ runner.os }}][${{ steps.find-hash.outputs.hash }}]" >> $GITHUB_OUTPUT + # The first value in square brackets is to make the key unique for debugging - name: Reuse cached installation if: ${{ inputs.cache == 'true' }} @@ -154,7 +154,7 @@ runs: # To run the old setup action which is javascript - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 20 @@ -180,6 +180,14 @@ runs: alr --version { alr index --update-all >/dev/null && echo "Index refreshed"; } || echo "Index refresh failed" + # Report GNAT version if available (might be deselected with `toolchain` argument) + - shell: bash + run: | + alr -n -q init --bin find_gnat && cd find_gnat + echo "Using gnat: $(alr exec -- which gnat)" || true + echo "$(alr exec -- gnat --version)" || true + cd .. && rm -rf find_gnat + # Save cache early so we can verify its proper working in a test workflow. Otherwise # it's not saved until workflow completion and by then it's too late. # When cache was hit, attempting to save will fail and emit a warning, so avoid it.