summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/test.yml88
1 files changed, 75 insertions, 13 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index f9c2b2b0..abce6d13 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -12,41 +12,103 @@ on:
jobs:
ci:
name: ci
- runs-on: ubuntu-latest
strategy:
matrix:
- scala: [2.12.12]
- container:
- image: ucbbar/chisel3-tools
- options: --user github --entrypoint /bin/bash
- env:
- CONTAINER_HOME: /home/github
+ system: ["ubuntu-20.04"]
+ jvm: ["adopt@1.8"]
+ scala: ["2.13.6", "2.12.15"]
+ verilator: ["4.204"]
+ espresso: ["2.4"]
+ runs-on: ${{ matrix.system }}
steps:
- name: Checkout
uses: actions/checkout@v2
+
+ - name: Install Z3
+ if: matrix.system == 'ubuntu-20.04'
+ run: |
+ sudo apt-get install -y z3
+ z3 --version
+
+ - name: Cache Verilator ${{ matrix.verilator }}
+ uses: actions/cache@v2.1.6
+ id: cache-verilator
+ with:
+ path: verilator-${{ matrix.verilator }}
+ key: ${{ matrix.system }}-verilator-${{ matrix.verilator }}
+ - name: Compile Verilator ${{ matrix.verilator }}
+ if: steps.cache-verilator.outputs.cache-hit != 'true'
+ run: |
+ wget https://github.com/verilator/verilator/archive/refs/tags/v${{ matrix.verilator }}.tar.gz
+ tar xvf v${{ matrix.verilator }}.tar.gz
+ cd verilator-${{ matrix.verilator }}
+ autoconf
+ ./configure
+ make
+ - name: Install Verilator ${{ matrix.verilator }}
+ run: |
+ cd verilator-${{ matrix.verilator }}
+ sudo make install
+ verilator --version
+
+ - 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
+
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
- java-version: adopt@1.8
+ java-version: ${{ matrix.jvm }}
- name: Cache Scala
uses: coursier/cache-action@v5
- name: Documentation (Scala 2.12 only)
- if: matrix.scala == '2.12.12'
+ if: startsWith(matrix.scala, '2.12')
run: sbt ++${{ matrix.scala }} docs/mdoc
- name: Test
- run: sbt ++${{ matrix.scala }} test
+ run: sbt ++${{ matrix.scala }} test noPluginTests/test
- name: Binary compatibility
run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues
+ integration:
+ name: Integration Tests (w/ chiseltest)
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Install Verilator and Z3
+ run: |
+ sudo apt-get install -y verilator z3
+ verilator --version
+ z3 --version
+ - 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
+ - name: Setup Scala
+ uses: olafurpg/setup-scala@v10
+ with:
+ java-version: "adopt@1.11"
+ - name: Cache Scala
+ uses: coursier/cache-action@v5
+ - name: Integration Tests
+ run: sbt integrationTests/test
+
# Sentinel job to simplify how we specify which checks need to pass in branch
# protection and in Mergify
#
# When adding new jobs, please add them to `needs` below
all_tests_passed:
name: "all tests passed"
- needs: [ci]
- runs-on: ubuntu-latest
+ needs: [ci, integration]
+ runs-on: ubuntu-20.04
steps:
- run: echo Success!
@@ -54,7 +116,7 @@ jobs:
# separate from a Scala versions build matrix to avoid duplicate publishing
publish:
needs: [all_tests_passed]
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
if: github.event_name == 'push'
steps: