mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-05 13:56:04 +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:
parent
4aa075be46
commit
dcc24edd9a
2 changed files with 12 additions and 6 deletions
2
.github/actions/setup-build-env/action.yml
vendored
2
.github/actions/setup-build-env/action.yml
vendored
|
|
@ -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 }}
|
||||||
|
|
|
||||||
16
.github/actions/setup-iverilog/action.yml
vendored
16
.github/actions/setup-iverilog/action.yml
vendored
|
|
@ -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 }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue