aboutsummaryrefslogtreecommitdiff
path: root/rv64cpu/.github/workflows/ci.yml
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-11-07 04:31:31 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-11-07 04:31:31 +0800
commita7d5b2468553c6d3570ca2aa45c27cb93e26cb88 (patch)
tree7031b1fac52e4f858c4e92041485135242768f7b /rv64cpu/.github/workflows/ci.yml
parent4ca723bc9dc1b9db1bd03e3b3db0c58079c3f3c4 (diff)
parent3b0b67af63af86c5ec9b2a63defa06b70923b2e3 (diff)
downloadrcc-project-a7d5b2468553c6d3570ca2aa45c27cb93e26cb88.tar.gz
rcc-project-a7d5b2468553c6d3570ca2aa45c27cb93e26cb88.tar.xz
Merge remote-tracking branch 'rv64cpu-import/master'
Diffstat (limited to 'rv64cpu/.github/workflows/ci.yml')
-rw-r--r--rv64cpu/.github/workflows/ci.yml64
1 files changed, 64 insertions, 0 deletions
diff --git a/rv64cpu/.github/workflows/ci.yml b/rv64cpu/.github/workflows/ci.yml
new file mode 100644
index 0000000..03551fa
--- /dev/null
+++ b/rv64cpu/.github/workflows/ci.yml
@@ -0,0 +1,64 @@
+name: CI
+
+on:
+ push:
+ branches: [ main, develop ]
+ pull_request:
+ branches: [ main ]
+
+jobs:
+ verilator-build:
+ name: Verilator Build & Test
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y \
+ verilator \
+ cmake \
+ build-essential \
+ git \
+ autoconf \
+ flex \
+ bison \
+ libfl-dev
+
+ - name: Check Verilator version
+ run: verilator --version
+
+ - name: Configure
+ run: cmake -B build -DENABLE_TRACE=OFF
+
+ - name: Build
+ run: cmake --build build -j$(nproc)
+
+ - name: Test
+ run: ctest --test-dir build --output-on-failure --timeout 120
+
+ lint:
+ name: Verilator Lint
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Install Verilator
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y verilator
+
+ - name: Lint RTL
+ run: |
+ verilator --lint-only --sv -Wall \
+ -Irtl/core/include \
+ rtl/soc/richard_soc.sv \
+ $(find rtl -name '*.sv' ! -name 'richard_soc.sv') \
+ || echo "Lint completed with warnings"