Skip to content

Commit c80e384

Browse files
committed
Run tests in CI
Run tests in CI to better demonstrate how to build things. At the moment there are some failures. I think I have stashed changes that fix them, but I think some of them have been introduced by newer tool versions. Closes: #2 Signed-off-by: Sean Anderson <seanga2@gmail.com>
1 parent f8d9d72 commit c80e384

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

.github/workflows/doc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
- uses: actions/checkout@v3
2020
with:
2121
submodules: true
22+
- if: ${{ env.ACT }}
23+
run: sudo apt-get update
2224
- run: sudo apt-get install -y asciidoctor
2325
- id: config
2426
uses: actions/configure-pages@v2

.github/workflows/rtl.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Run test suite
2+
3+
on:
4+
push
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-24.04
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Install dependencies missing in act
12+
if: ${{ env.ACT }}
13+
run: |
14+
sudo apt-get update
15+
sudo apt-get install -y python3-dev
16+
- name: Get pip cache dir
17+
id: pip-cache
18+
run: |
19+
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
20+
- name: Cache pip dependencies
21+
uses: actions/cache@v3
22+
with:
23+
path: ${{ steps.pip-cache.outputs.dir }}
24+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
25+
restore-keys: |
26+
${{ runner.os }}-pip-
27+
- name: Install dependencies
28+
run: |
29+
echo "$HOME/.local/bin" >> $GITHUB_PATH
30+
sudo apt-get install -y fpga-icestorm iverilog nextpnr-ice40 yosys-dev
31+
python3 -m venv venv
32+
venv/bin/pip install -r requirements.txt
33+
- name: Run tests
34+
run: |
35+
source venv/bin/activate
36+
make -k test

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
asyncstdlib==3.12.2
2+
cocotb @ git+https://git@github.com/Forty-Bot/cocotb.git@8810af1a66c461217dc00d0aa47043b8ea130f65
3+
find_libpython==0.3.0

0 commit comments

Comments
 (0)