Skip to content

Commit

Permalink
ci: install and cache PDK
Browse files Browse the repository at this point in the history
Signed-off-by: Kareem Farid <[email protected]>
  • Loading branch information
kareefardi committed Jan 13, 2025
1 parent e1dc45d commit 725c948
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/actions/install-pdk/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Install PDK'
description: 'Install PDK using volare. Uses github actions cache'
runs:
using: "composite"
steps:
- name: Set Env Variables
shell: bash
run: |
echo "PDK_ROOT=$HOME/.volare" >> $GITHUB_OUTPUT
echo "OPEN_PDKS_COMMIT=bdc9412b3e468c102d01b7cf6337be06ec6e9c9a" >> $GITHUB_OUTPUT
- name: Cache PDK
shell: bash
id: cache-pdk
uses: actions/cache/restore@v4
with:
path: ${{env.PDK_ROOT}}
key: pdk-${{env.OPEN_PDKS_COMMIT}}
enableCrossOsArchive: "true"
- name: Download PDK
shell: bash
if: ${{ steps.cache-pdk.outputs.cache-hit != 'true' }}
run: |
mkdir -p ${{ env.PDK_ROOT }}
pip install volare
volare enable ${{ env.OPEN_PDKS_COMMIT }}
- name: Save PDK Cache
shell: bash
if: ${{ steps.cache-pdk.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
with:
path: ${{env.PDK_ROOT}}
key: pdk-${{env.OPEN_PDKS_COMMIT}}
12 changes: 11 additions & 1 deletion .github/workflows/run_IP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ on:
required: false
type: string
default: no


jobs:
Install-PDK:
runs-on: ubuntu-latest
steps:
- name: Install PDK
uses: efabless/EF_UVM/.github/actions/install-pdk@main

Setup-Work-Space:
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -106,7 +114,7 @@ jobs:
echo "tests=$(python3 ${{ env.EF_UVM_PATH }}/.github/scripts/get_tests_matrix.py --tests ${{ inputs.test-names }} --buses ${{ inputs.buses }} --skip-gl ${{ inputs.skip-gl }}) " >> "$GITHUB_OUTPUT"
Run-IP:
needs: [Setup-Work-Space, Prepare-Tests-Matrix]
needs: [Install-PDK, Setup-Work-Space, Prepare-Tests-Matrix]
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -120,6 +128,8 @@ jobs:
echo "IP_PATH=${{ github.workspace }}/${{ inputs.name }}" >> $GITHUB_ENV
echo "MY_WORKSPACE=${{ github.workspace }}/${{ inputs.name }}" >> $GITHUB_ENV
echo "STATUS=env-error" >> $GITHUB_ENV
- name: Install PDK
uses: efabless/EF_UVM/.github/actions/install-pdk@main
- name: Set More Env Variables
shell: bash
run: |
Expand Down

0 comments on commit 725c948

Please sign in to comment.