Skip to content

Commit

Permalink
Report GNAT in use 1st hand
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Jun 27, 2024
1 parent df55852 commit 6503031
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down Expand Up @@ -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

Expand All @@ -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.
Expand Down

0 comments on commit 6503031

Please sign in to comment.