Repository navigation
104 lines (83 loc) · 3.06 KB
/
Copy pathci.yml
File metadata and controls
104 lines (83 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
rtl:
name: RTL lint, tests, and differential verification
runs-on: ubuntu-latest
timeout-minutes: 30
env:
NEMU_DIR: ${{ github.workspace }}/Nemu
steps:
- name: Check out Neuron
uses: actions/checkout@v4
- name: Check out Nemu
uses: actions/checkout@v4
with:
repository: TangibleResearch/Nemu
path: Nemu
# Keep CI deterministic; see Claude's pinning note in CHATGPT.md.
ref: 7e62582523b4059d20b657e1f7c270d95f1dd4bc
- name: Install Verilator
run: |
sudo apt-get update
sudo apt-get install --yes verilator xxd
- name: Build NuASM and the Nemu reference CLI
run: |
cargo build --release --bin nuasm --manifest-path "$NEMU_DIR/Cargo.toml"
cargo build --release --bin neuron --manifest-path "$NEMU_DIR/Cargo.toml"
- name: RTL lint (synthesizability audit)
run: scripts/lint.sh
- name: Generate NuASM test vectors
run: sim/gen_testvectors.sh
- name: Run instruction-level RTL tests (zero-latency memory)
run: tb/run_all.sh
- name: Run instruction-level RTL tests (delayed/synchronous memory)
run: tb/run_delay_tests.sh
- name: Run per-module testbenches (alu, register, clock, matrix/MAC hardening, reset hardening)
run: tb/run_module_tests.sh
- name: Differential verification against Nemu (hand-written programs)
run: |
for prog in "$NEMU_DIR"/programs/tests/*.nuasm; do
scripts/diff_test.sh "$prog"
done
- name: Differential verification against Nemu (randomized programs, deterministic seed)
run: scripts/diff_test.sh --random --seed 20260101 --count 40
- name: Upload failing differential-test programs (if any)
if: failure()
uses: actions/upload-artifact@v4
with:
name: diff-test-failures
path: tb/build/diff_fail_seed_*.nuasm
if-no-files-found: ignore
synthesis:
name: Generic synthesis check (Yosys)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out Neuron
uses: actions/checkout@v4
- name: Install Yosys
run: |
sudo apt-get update
sudo apt-get install --yes yosys
# Yosys's built-in SV frontend can't parse unpacked-array ports;
# scripts/synth_check.sh converts the RTL with sv2v first.
- name: Install sv2v
run: |
curl -sSL -o "$RUNNER_TEMP/sv2v.zip" https://github.com/zachjs/sv2v/releases/download/v0.0.13/sv2v-Linux.zip
unzip -q "$RUNNER_TEMP/sv2v.zip" -d "$RUNNER_TEMP/sv2v"
echo "$RUNNER_TEMP/sv2v/sv2v-Linux" >> "$GITHUB_PATH"
- name: Run synthesis check
run: scripts/synth_check.sh
- name: Upload synthesis reports
if: always()
uses: actions/upload-artifact@v4
with:
name: synth-reports
path: build/reports/
if-no-files-found: ignore