Skip to content

Commit 272ff2c

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 272ff2c

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

.github/workflows/doc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ concurrency:
1414

1515
jobs:
1616
build:
17-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-24.04
1818
steps:
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: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Run test suite
2+
3+
on:
4+
push
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
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+
- run: |
34+
source venv/bin/activate
35+
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)