-
Notifications
You must be signed in to change notification settings - Fork 66
102 lines (89 loc) · 3.65 KB
/
main.yml
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
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test-difftest:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Prepare environment
run: |
cd $GITHUB_WORKSPACE/..
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
git clone https://github.com/OpenXiangShan/xs-env
cd $GITHUB_WORKSPACE/../xs-env
sudo -s ./setup-tools.sh
source ./setup.sh
rm -r $GITHUB_WORKSPACE/../xs-env/NutShell/difftest
rm -r $GITHUB_WORKSPACE/../xs-env/XiangShan/difftest
cp -r $GITHUB_WORKSPACE $GITHUB_WORKSPACE/../xs-env/NutShell
cp -r $GITHUB_WORKSPACE $GITHUB_WORKSPACE/../xs-env/XiangShan
- name: Basic Difftest (NutShell)
run: |
cd $GITHUB_WORKSPACE/../xs-env
source ./env.sh
rm -r ./NEMU
git clone https://github.com/OpenXiangShan/NEMU
cd NEMU
make riscv64-xs-ref_defconfig
make
cd $GITHUB_WORKSPACE/../xs-env/NutShell
source ./env.sh
make clean
make emu EMU_CXX_EXTRA_FLAGS="-DFIRST_INST_ADDRESS=0x80000000" WITH_CHISELDB=0 WITH_CONSTANTIN=0
./build/emu -b 0 -e 0 -i ./ready-to-run/microbench.bin
# - name: Difftest with Fork-Wait Snapshot
# run: |
# cd $GITHUB_WORKSPACE/../xs-env
# source ./env.sh
# cd $GITHUB_WORKSPACE/../xs-env/NutShell
# source ./env.sh
# make clean
# make emu EMU_THREADS=2 EMU_CXX_EXTRA_FLAGS="-DFIRST_INST_ADDRESS=0x80000000"
# ./build/emu -b 0 -e 0 -i ./ready-to-run/microbench.bin --enable-fork
- name: Difftest with Snapshot
run: |
cd $GITHUB_WORKSPACE/../xs-env
source ./env.sh
rm -r ./NEMU
git clone https://github.com/OpenXiangShan/NEMU
cd NEMU
make riscv64-xs-ref_defconfig
make
cd $GITHUB_WORKSPACE/../xs-env/NutShell
source ./env.sh
make clean
make emu EMU_SNAPSHOT=1 EMU_CXX_EXTRA_FLAGS="-DFIRST_INST_ADDRESS=0x80000000" WITH_CHISELDB=0 WITH_CONSTANTIN=0
./build/emu -b 0 -e 0 -i ./ready-to-run/microbench.bin
- name: Difftest with Trace
run: |
cd $GITHUB_WORKSPACE/../xs-env
source ./env.sh
rm -r ./NEMU
git clone https://github.com/OpenXiangShan/NEMU
cd NEMU
make riscv64-xs-ref_defconfig
make
cd $GITHUB_WORKSPACE/../xs-env/NutShell
source ./env.sh
make clean
make emu EMU_TRACE=1 EMU_CXX_EXTRA_FLAGS="-DFIRST_INST_ADDRESS=0x80000000" WITH_CHISELDB=0 WITH_CONSTANTIN=0
./build/emu -b 10 -e 12 -i ./ready-to-run/microbench.bin --dump-wave
# Github hosted CI does not support XiangShan
# - name: Difftest XiangShan
# run: |
# cd $GITHUB_WORKSPACE/../xs-env
# source ./env.sh
# cd $GITHUB_WORKSPACE/../xs-env/XiangShan
# make emu CONFIG=MinimalConfig
# ./build/emu -b 0 -e 0 -i ./ready-to-run/linux.bin