-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
on: | ||
push: | ||
pull_request: | ||
|
||
name: CI | ||
|
||
# TODO: Print outputs on failing steps. This can be done with something like: | ||
# gzip -c cover.vcd | base64 | base64 -d | gunzip > cover-out.vcd | ||
|
||
jobs: | ||
ci-linux: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- uses: pdm-project/setup-pdm@v3 | ||
with: | ||
python-version: 3.11 | ||
cache: true | ||
- name: Install riscv64 GCC | ||
run: sudo apt install -y gcc-riscv64-unknown-elf | ||
- name: Set oss-cad-suite vars (for cache) | ||
run: | | ||
echo >> $GITHUB_ENV OSS_CAD_SUITE_DATE=$(cat ci/oss-cad-suite-version) | ||
- name: Cache OSS CAD Suite | ||
id: cache-oss-cad-suite | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/cache/ | ||
key: ${{ runner.os }}-${{ env.OSS_CAD_SUITE_DATE }} | ||
- name: Download OSS CAD Suite | ||
if: steps.cache-oss-cad-suite.outputs.cache-hit != 'true' | ||
run: | | ||
mkdir -p ~/cache/oss-cad-suite-linux-x64 | ||
wget https://github.com/YosysHQ/oss-cad-suite-build/releases/download/$OSS_CAD_SUITE_DATE/oss-cad-suite-linux-x64-$(echo $OSS_CAD_SUITE_DATE | sed s/-//g).tgz -nv -O oss-cad-suite-linux-x64.tar.gz | ||
tar -xzf oss-cad-suite-linux-x64.tar.gz -C ~/cache/oss-cad-suite-linux-x64 | ||
- name: Set OSS CAD Suite path | ||
run: echo >> $GITHUB_PATH `echo ~/cache/oss-cad-suite-linux-x64/*/bin` | ||
- name: Install PDM dependencies | ||
run: pdm install --dev | ||
- name: Run Pytest Tests | ||
run: | | ||
pdm test-quick | ||
- name: Run RISC-V Formal | ||
# LD_PRELOAD, which GHA seems to set by default, interferes with | ||
# oss-cad-suite setup by mixing incompatible libcs, so unset it | ||
# for any commands requiring yosys/nextpnr. | ||
run: | | ||
LD_PRELOAD="" pdm rvformal-all | ||
- name: Test Generate Verilog | ||
run: | | ||
LD_PRELOAD="" pdm gen -o sentinel.v | ||
- name: Create Demo Bitstream | ||
run: | | ||
LD_PRELOAD="" pdm demo | ||
- name: Benchmark Demo Bitstream | ||
run: | | ||
LD_PRELOAD="" pdm bench-luts |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2023-11-06 |