3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-05 05:49:15 +00:00

CI: Save iverilog cache in action

We still want to cache iverilog even if the rest of the action fails, so explicitly save/restore instead of standard cache.
This commit is contained in:
Krystine Sherwin 2025-11-01 13:03:33 +13:00
parent 4aa075be46
commit dcc24edd9a
No known key found for this signature in database
2 changed files with 12 additions and 6 deletions

View file

@ -45,7 +45,7 @@ runs:
echo "procs=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV echo "procs=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
- name: Setup iverilog - name: Setup iverilog
if: inputs.get-iverilog if: inputs.get-iverilog == 'true'
uses: ./.github/actions/setup-iverilog uses: ./.github/actions/setup-iverilog
with: with:
runs-on: ${{ inputs.runs-on }} runs-on: ${{ inputs.runs-on }}

View file

@ -27,21 +27,20 @@ runs:
make -j$procs make -j$procs
make install make install
- name: Cache iverilog - uses: actions/cache/restore@v4
id: cache-iverilog id: restore-iverilog
uses: actions/cache@v4
with: with:
path: .local/ path: .local/
key: ${{ inputs.runs-on }}-${{ steps.get-iverilog.outputs.IVERILOG_GIT }} key: ${{ inputs.runs-on }}-${{ steps.get-iverilog.outputs.IVERILOG_GIT }}
- name: iverilog macOS deps - name: iverilog macOS deps
if: steps.cache-iverilog.outputs.cache-hit != 'true' && runner.os == 'macOS' if: steps.restore-iverilog.outputs.cache-hit != 'true' && runner.os == 'macOS'
shell: bash shell: bash
run: | run: |
brew install autoconf brew install autoconf
- name: Build iverilog - name: Build iverilog
if: steps.cache-iverilog.outputs.cache-hit != 'true' if: steps.restore-iverilog.outputs.cache-hit != 'true'
shell: bash shell: bash
run: | run: |
mkdir -p ${{ github.workspace }}/.local/ mkdir -p ${{ github.workspace }}/.local/
@ -55,3 +54,10 @@ runs:
shell: bash shell: bash
run: | run: |
iverilog -V iverilog -V
- uses: actions/cache/save@v4
id: save-iverilog
if: steps.restore-iverilog.outputs.cache-hit != 'true'
with:
path: .local/
key: ${{ steps.restore-iverilog.outputs.cache-primary-key }}