Skip to content

Commit 0965f5a

Browse files
committed
Expand regression CI to run multiple network topologies via matrix strategy
1 parent 74c2c1f commit 0965f5a

1 file changed

Lines changed: 52 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,13 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
regress:
11-
name: Verilator Regression Suite
10+
setup-verilator:
11+
name: Setup Verilator Cache
1212
runs-on: ubuntu-latest
13-
1413
steps:
1514
- name: Checkout Code
1615
uses: actions/checkout@v5
1716

18-
- name: Set up Python
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: '3.x'
22-
23-
- name: Install Python Dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
pip install numpy
27-
2817
- name: Cache Verilator Build
2918
id: cache-verilator
3019
uses: actions/cache@v5
@@ -33,6 +22,7 @@ jobs:
3322
key: verilator-5.048-v2
3423

3524
- name: Install Build Prerequisites
25+
if: steps.cache-verilator.outputs.cache-hit != 'true'
3626
run: |
3727
sudo apt-get update
3828
sudo apt-get install -y git help2man perl python3 make autoconf g++ flex bison ccache
@@ -53,10 +43,58 @@ jobs:
5343
make -j$(nproc)
5444
make install
5545
46+
regress:
47+
name: Regression / ${{ matrix.config }}
48+
needs: setup-verilator
49+
runs-on: ubuntu-latest
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
config:
54+
- router_4x4
55+
- router_8x8
56+
- ring_4
57+
- ring_8
58+
- double_ring_4
59+
- mesh_2x2
60+
- mesh_4x4
61+
- torus_2x2
62+
- torus_4x4
63+
- dtorus_2x2
64+
- butterfly_k2_n2
65+
- butterfly_k4_n2
66+
- fat_tree_k2_n2
67+
- fat_tree_k4_n2
68+
- router_4x4_ser2
69+
- router_4x4_clkcross2
70+
- fully_connected_4x2
71+
72+
steps:
73+
- name: Checkout Code
74+
uses: actions/checkout@v5
75+
76+
- name: Set up Python
77+
uses: actions/setup-python@v5
78+
with:
79+
python-version: '3.x'
80+
81+
- name: Install Python Dependencies
82+
run: |
83+
python -m pip install --upgrade pip
84+
pip install numpy
85+
86+
- name: Restore Verilator Cache
87+
uses: actions/cache/restore@v5
88+
with:
89+
path: /home/runner/verilator-bin
90+
key: verilator-5.048-v2
91+
fail-on-cache-miss: true
92+
5693
- name: Add Verilator to PATH
5794
run: |
5895
echo "/home/runner/verilator-bin/bin" >> $GITHUB_PATH
5996
6097
- name: Run Regression Suite
6198
run: |
62-
make -C test regress REGRESS_PACKET_COUNT=65536 THREADS=4
99+
ARGS=$(make -C test --no-print-directory _regress_print_args_${{ matrix.config }})
100+
make -C test verilator $ARGS PACKET_COUNT=65536 THREADS=4

0 commit comments

Comments
 (0)