Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/xiangshan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: XiangShan Nightly Regression

on:
pull_request:
branches: [ master ]

jobs:
xiangshan-difftest:
strategy:
fail-fast: false
matrix:
branch: [ master, kunminghu-v3 ]
topo:
- name: single
num_cores: 1
workload: "./ready-to-run/linux.bin"
ref: "./ready-to-run/riscv64-nemu-interpreter-so"
- name: dual
num_cores: 2
workload: "/nfs/home/share/ci-workloads/linux-hello-smp-opensbi/bbl.bin"
ref: "./ready-to-run/riscv64-nemu-interpreter-dual-so"
debug_args: [ "--difftest-config ZESNH" ]
config: [ DefaultConfig ]

runs-on: self-hosted
timeout-minutes: 720
name: ${{ matrix.branch }}-${{ matrix.topo.name }}
steps:
- uses: actions/checkout@v4

- name: Set Env
run: |
source /nfs/home/ci-runner/ci-runner-difftest/tools/env.sh
clang --version
verilator -V

- name: Prepare XiangShan
run: |
cd $GITHUB_WORKSPACE/..
NOOP_HOME="$PWD/XiangShan-${{ matrix.branch }}"
echo "NOOP_HOME=$NOOP_HOME" >> "$GITHUB_ENV"
if [ ! -d "$NOOP_HOME" ]; then
git clone -b ${{ matrix.branch }} --single-branch https://github.com/OpenXiangShan/XiangShan.git $NOOP_HOME
fi
cd $NOOP_HOME
git fetch origin
git checkout ${{ matrix.branch }}
git reset --hard origin/${{ matrix.branch }}
rm -rf difftest && make init
rm -rf difftest && cp -r $GITHUB_WORKSPACE .
make clean

- name: Generate Verilog
run: |
cd $NOOP_HOME
make sim-verilog PLDM=1 NUM_CORES=${{ matrix.topo.num_cores }} DEBUG_ARGS="${{ matrix.debug_args }}" CONFIG=${{ matrix.config }} WITH_CHISELDB=0 WITH_CONSTANTIN=0 -j16

- name: Build SIMV
run: |
cd $NOOP_HOME
make simv VCS=verilator NUM_CORES=${{ matrix.topo.num_cores }} WITH_CHISELDB=0 WITH_CONSTANTIN=0 -j16

- name: Test with Linux
run: |
cd $NOOP_HOME
./build/simv +workload=${{ matrix.topo.workload }} +diff=${{ matrix.topo.ref }}
Loading