Skip to content

Commit

Permalink
[ci] Remove caching of firtool (chipsalliance#3478)
Browse files Browse the repository at this point in the history
Remove caching of the `firtool` binary.  Caching empirically provides no
measurable benefit over downloading the binary from a GitHub Release every
time.

This has the effect of avoiding a bug where the "default" old version
would incorrectly hit when the `firtool` version is updated via a change
to the `./etc/circt.json` file.

Additionally, fix another bug where the environment is not populated for
composite actions---the `./etc/circt.json` filename needs to be inlined to
work.  This was previously working because the cache was always hitting.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
  • Loading branch information
seldridge authored Aug 9, 2023
1 parent 85f4a73 commit b2b7e1a
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/install-circt/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,15 @@ inputs:
required: true
default: ${{ github.token }}

env:
circt-config: ./etc/circt.json

runs:
using: composite
steps:
- id: cache-circt
- name: Download release `firtool` binary
shell: bash
if: inputs.version != 'nightly'
uses: actions/cache@v3
with:
path: circt
key: circt-${{ runner.os }}-${{ inputs.version }}

- shell: bash
if: inputs.version != 'nightly' && steps.cache-circt.outputs.cache-hit != 'true'
run: |
if [[ "${{ inputs.version }}" == "default" ]]; then
export VERSION=`jq .version < ${{ env.circt-config }}`
export VERSION=`jq -r .version < ./etc/circt.json`
else
export VERSION="${{ inputs.version }}"
fi
Expand Down

0 comments on commit b2b7e1a

Please sign in to comment.