This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
Coverage Passes #1318
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- 0.5.x | |
- 0.3.x | |
jobs: | |
test: | |
name: sbt test on ubuntu | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
scala: [2.13.10] | |
jvm: [8, 11] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Scala | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: ${{ matrix.jvm }} | |
- name: Test | |
timeout-minutes: 6 | |
run: sbt ++${{ matrix.scala }} "testOnly chiseltest.** -- -l RequiresVcs -l RequiresVerilator -l Formal -l RequiresIcarus" | |
integration-test: | |
name: Integration Tests | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
scala: [ 2.13.10 ] | |
jvm: [ 8, 11, 20 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Scala | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: ${{ matrix.jvm }} | |
- name: Test | |
timeout-minutes: 6 | |
run: sbt ++${{ matrix.scala }} "testOnly integration.**" | |
test-mac: | |
name: sbt test on mac | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Test | |
timeout-minutes: 10 | |
run: sbt "testOnly chiseltest.** -- -l RequiresVcs -l RequiresVerilator -l Formal -l RequiresIcarus" | |
icarus: | |
name: icarus verilog | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, macos-latest ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Icarus Verilog for Ubuntu | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get install -y iverilog | |
iverilog -v || true | |
- name: Install Icarus Verilog for MacOS | |
if: runner.os == 'macOS' | |
run: | | |
brew install icarus-verilog | |
iverilog -v || true | |
- name: Test | |
timeout-minutes: 6 | |
run: sbt ++${{ matrix.scala }} "testOnly chiseltest.** -- -n RequiresIcarus" | |
verilator: | |
name: verilator regressions | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
# 4.028: Ubuntu 20.04, Fedora 32 | |
# 4.032: Fedora 33 | |
# 4.034: Chipyard | |
# 4.038: Ubuntu 20.10 | |
# 4.108: Fedora 34 | |
# 4.200: currently the latest version on brew (MacOS) | |
# 4.202: added "forcePerInstance" to support our coverage flow | |
version: ["4.028", "4.032", "4.034", "4.038", "4.108", "4.200", "4.202"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Verilator Build Dependencies | |
run: sudo apt-get install -y git make autoconf g++ flex bison libfl2 libfl-dev | |
- name: Cache Verilator ${{ matrix.version }} | |
uses: actions/cache@v3 | |
id: cache-verilator | |
with: | |
path: verilator-${{ matrix.version }} | |
key: ${{ runner.os }}-verilator-${{ matrix.version }} | |
- name: Compile Verilator ${{ matrix.version }} | |
if: steps.cache-verilator.outputs.cache-hit != 'true' | |
run: | | |
wget https://github.com/verilator/verilator/archive/refs/tags/v${{ matrix.version }}.zip | |
unzip v${{ matrix.version }}.zip | |
cd verilator-${{ matrix.version }} | |
autoconf | |
./configure | |
make | |
- name: Install Verilator ${{ matrix.version }} | |
run: | | |
cd verilator-${{ matrix.version }} | |
sudo make install | |
verilator --version | |
- name: Test | |
run: sbt "testOnly chiseltest.** -- -n RequiresVerilator" | |
formal: | |
name: formal verification tests | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
backend: [z3, cvc4, btormc, bitwuzla] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Z3 and CVC4 | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get install -y z3 cvc4 | |
z3 --version | |
cvc4 --version | |
- name: Install Tabby OSS Cad Suite (from YosysHQ) | |
uses: ./.github/workflows/setup-oss-cad-suite | |
with: | |
osscadsuite-version: '2023-01-09' | |
- name: Test | |
run: sbt "testOnly chiseltest.** -- -n Formal -Dformal_engine=${{ matrix.backend }}" | |
formal-mac: | |
name: formal verification tests on mac | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Z3 for MacOS | |
run: | | |
brew install z3 | |
z3 --version | |
- name: Test | |
run: sbt "testOnly chiseltest.** -- -n Formal -Dformal_engine=z3" | |
doc: | |
name: Documentation and Formatting | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Documentation | |
id: doc | |
run: sbt doc | |
- name: Check Formatting | |
run: sbt scalafmtCheckAll | |
no-warn: | |
name: No Warnings with Scala 2.13 for PRs | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check for Warnings | |
run: sbt "set ThisBuild / scalacOptions ++= Seq(\"-Xfatal-warnings\") ; compile" | |
- name: Check for Warnings in Tests | |
run: sbt "set ThisBuild / scalacOptions ++= Seq(\"-Xfatal-warnings\") ; Test / compile" | |
test-treadle: | |
name: sbt test for treadle on ubuntu | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
scala: [2.13.10] | |
jvm: [8, 11] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Scala | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: ${{ matrix.jvm }} | |
- name: Test | |
run: sbt ++${{ matrix.scala }} "testOnly treadle2.**" | |
# 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: [test, doc, verilator, formal, formal-mac, icarus, test-mac, no-warn, integration-test] | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo Success! | |
# sbt ci-release publishes all cross versions so this job needs to be | |
# separate from a Scala versions build matrix to avoid duplicate publishing | |
publish: | |
# note: we do not require a warning check for publishing! | |
needs: [test, doc, verilator, formal, formal-mac, icarus, test-mac, test-treadle, integration-test] | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup GPG (for Publish) | |
uses: olafurpg/setup-gpg@v3 | |
- name: Publish | |
run: sbt ci-release | |
env: | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |