Set up Chryse project dependencies in GitHub Actions ·
github
r/o

setup-chryse

Install dependencies for Chryse, and optionally the library itself from source. action.yml is an easy read.

Base usage

Install:

- name: Set up Chryse
uses: chryse-hdl/setup-chryse@v2

OSS CAD Suite

Additionally install OSS CAD Suite using YosysHQ/setup-oss-cad-suite. The suite’s Verilator install is used instead of getting it from apt.

- name: Set up Chryse
uses: chryse-hdl/setup-chryse@v2
with:
install-oss-cad-suite: true
github-token: ${{ secrets.GITHUB_TOKEN }}

Zig

Additionally install Zig using goto-bus-stop/setup-zig.

- name: Set up Chryse
uses: chryse-hdl/setup-chryse@v2
with:
install-zig: 0.13.0

Chryse from source

Clone Chryse and sbt publishLocal a particular ref of it.

- name: Set up Chryse
uses: chryse-hdl/setup-chryse@v2
with:
source-ref: main

Rationale

  • ChiselSim depends on Verilator 5.x in all but the simplest usage.
  • The ubuntu-22.04 GitHub Actions runner (current ubuntu-latest) includes sbt in the base image, but the Verilator in apt is 4.x.
  • The ubuntu-24.04 runner has Verilator 5.x in apt, but no sbt. -_-

I’m preferring getting ready for 24.04 sooner, so we fetch sbt manually, and install Verilator from apt if we’re not obtaining OSS CAD Suite (which bundles it).

We don’t need OSS CAD Suite if we’re not synthesising, and YosysHQ/setup-oss-cad-suite’s use of the GitHub API means it’s pretty easy to trigger API rate-limits even when providing a token! So I try to make it easy to avoid it.