Skip to content

Commit

Permalink
.github:workflows: Add VHDL build and test workflow
Browse files Browse the repository at this point in the history
 Rename old workflow to fabric_gen_verilog.
 Add a workflow to build and simulate a VHDL fabric.

Signed-off-by: Jonas K. <[email protected]>
  • Loading branch information
EverythingElseWasAlreadyTaken committed Feb 3, 2025
1 parent e25f18b commit 76941ce
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install FABulous
run: |
pip3 install -e .
- name: Run fabric generator flow and simulation
- name: Run fabric generator flow and simulation for verilog
run: |
FABulous -c demo
FABulous demo -fs ./demo/FABulous.tcl
FABulous -c demo_verilog
FABulous demo_verilog -fs ./demo_verilog/FABulous.tcl
37 changes: 37 additions & 0 deletions .github/workflows/fabric_gen_vhdl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test fabric_gen.py

on: [push, pull_request]

jobs:
build_and_run:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Set up OSS CAD suite
uses: YosysHQ/setup-oss-cad-suite@v2
- name: Install dependencies
run: |
apt update && apt install -y make
python3 -m pip install --upgrade pip
pip3 install flake8 pytest
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 FABulous/**/*.py --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 FABulous/**/*.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install FABulous
run: |
pip3 install -e .
- name: Run fabric generator flow and simulation for VHDL
run: |
FABulous -c demo_vhdl -w vhdl
cd demo_vhdl/Test && make full_sim

0 comments on commit 76941ce

Please sign in to comment.