summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/install-espresso/action.yml25
-rw-r--r--.github/workflows/setup-oss-cad-suite/action.yml24
-rw-r--r--.github/workflows/test.yml17
3 files changed, 48 insertions, 18 deletions
diff --git a/.github/workflows/install-espresso/action.yml b/.github/workflows/install-espresso/action.yml
new file mode 100644
index 00000000..fb1d655a
--- /dev/null
+++ b/.github/workflows/install-espresso/action.yml
@@ -0,0 +1,25 @@
+name: Install Espresso
+
+inputs:
+ version:
+ description: 'version to install'
+ required: false
+ default: '2.4'
+
+runs:
+ using: composite
+ steps:
+ - id: cache-espresso
+ uses: actions/cache@v3
+ with:
+ path: /usr/local/bin/espresso
+ key: espresso-${{ runner.os }}-${{ inputs.version }}
+
+ - shell: bash
+ if: steps.cache-espresso.outputs.cache-hit != 'true'
+ run: |
+ cd /tmp
+ wget -q https://github.com/chipsalliance/espresso/releases/download/v${{ inputs.version }}/x86_64-linux-gnu-espresso
+ chmod +x x86_64-linux-gnu-espresso
+ sudo mv x86_64-linux-gnu-espresso /usr/local/bin/espresso
+ espresso || true
diff --git a/.github/workflows/setup-oss-cad-suite/action.yml b/.github/workflows/setup-oss-cad-suite/action.yml
index 9383d56b..63d70e92 100644
--- a/.github/workflows/setup-oss-cad-suite/action.yml
+++ b/.github/workflows/setup-oss-cad-suite/action.yml
@@ -1,14 +1,28 @@
name: Setup OSS CAD Suite
+inputs:
+ version:
+ description: 'version to install'
+ required: false
+ default: '2021-11-09'
+
runs:
using: composite
steps:
- - name: Install Tabby OSS Cad Suite
- shell: bash
- env:
- VERSION: 2021-11-09
+ - id: cache-oss-cad-suite
+ uses: actions/cache@v3
+ with:
+ path: oss-cad-suite
+ key: oss-cad-suite-${{ runner.os }}-${{ inputs.version }}
+
+ - shell: bash
+ if: steps.cache-oss-cad-suite.outputs.cache-hit != 'true'
run: |
+ VERSION=${{ inputs.version }}
ARTIFACT=oss-cad-suite-linux-x64-$(echo $VERSION | tr -d '-')
wget -q -O - https://github.com/YosysHQ/oss-cad-suite-build/releases/download/${VERSION}/${ARTIFACT}.tgz | tar -zx
- echo "$(pwd)/oss-cad-suite/bin" >> $GITHUB_PATH
+
+ # Add the CAD Suite to the PATH
+ - shell: bash
+ run: echo "$(pwd)/oss-cad-suite/bin" >> $GITHUB_PATH
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index fee7019e..dd129812 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -27,13 +27,9 @@ jobs:
- name: Install Tabby OSS Cad Suite
uses: ./.github/workflows/setup-oss-cad-suite
- name: Install Espresso
- run: |
- cd /tmp
- wget https://github.com/chipsalliance/espresso/releases/download/v${{ matrix.espresso }}/x86_64-linux-gnu-espresso
- chmod +x x86_64-linux-gnu-espresso
- sudo mv x86_64-linux-gnu-espresso /usr/local/bin/espresso
- espresso || true
-
+ uses: ./.github/workflows/install-espresso
+ with:
+ version: ${{ matrix.espresso }}
- name: Setup Scala
uses: actions/setup-java@v3
with:
@@ -74,12 +70,7 @@ jobs:
- name: Install Tabby OSS Cad Suite
uses: ./.github/workflows/setup-oss-cad-suite
- name: Install Espresso
- run: |
- cd /tmp
- wget https://github.com/chipsalliance/espresso/releases/download/v2.4/x86_64-linux-gnu-espresso
- chmod +x x86_64-linux-gnu-espresso
- sudo mv x86_64-linux-gnu-espresso /usr/local/bin/espresso
- espresso || true
+ uses: ./.github/workflows/install-espresso
- name: Setup Scala
uses: actions/setup-java@v3
with: