-
Notifications
You must be signed in to change notification settings - Fork 199
105 lines (85 loc) · 3.65 KB
/
test.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
102
103
104
105
# This is a basic workflow to help you get started with Actions
name: CI test
# Controls when the action will run.
on:
# Triggers the workflow on pull request events but only for the main & dev branch
pull_request:
branches: [ '**' ]
# Triggers the workflow on push events
push:
branches: [ '**' ]
# Allows you to run this workflow Actions manually
workflow_dispatch:
# Triggers the action 2am every day
schedule:
- cron: "0 2 * * *"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
ACT-sail-spike:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
isa_group:
- RVIMAFDCZicsr_Zifencei
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-venv
sudo apt-get install -y gcc git autoconf automake libtool curl make unzip
sudo apt-get install autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev libslirp-dev
pip3 install git+https://github.com/riscv/riscof.git
- name: Build RISCV-GNU Toolchain (32 bit)
run: |
wget -c https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.09.03/riscv32-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz
tar -xzf riscv32-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz
mv riscv riscv32
echo $GITHUB_WORKSPACE/riscv32/bin >> $GITHUB_PATH
- name: Build RISCV-GNU Toolchain (64 bit)
run: |
wget -c https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.09.03/riscv64-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz
tar -xzf riscv64-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz
mv riscv riscv64
echo $GITHUB_WORKSPACE/riscv64/bin >> $GITHUB_PATH
- name: Install riscv-isac
run: |
cd riscv-isac
pip3 install --editable .
- name: Install riscv-ctg
run: |
cd riscv-ctg
pip3 install --editable .
- name: Install Spike
run: |
git clone https://github.com/riscv/riscv-isa-sim.git
sudo apt-get install device-tree-compiler libboost-regex-dev libboost-system-dev
cd riscv-isa-sim
mkdir build
cd build
../configure --prefix=$GITHUB_WORKSPACE/riscv64
make -j$(nproc)
sudo make install
echo $GITHUB_WORKSPACE/riscv64/bin >> $GITHUB_PATH
- name: Install Sail
run: |
sudo apt-get install opam build-essential libgmp-dev z3 pkg-config zlib1g-dev
opam init -y --disable-sandboxing
opam switch create ocaml-base-compiler
opam install sail -y
eval $(opam config env)
git clone https://github.com/riscv/sail-riscv.git
cd sail-riscv
ARCH=RV32 make
ARCH=RV64 make
echo $PWD/c_emulator >> $GITHUB_PATH
- name: Config and run riscof for RV32
run: |
cd riscof-plugins/rv32
riscof run --config config.ini --suite ../../riscv-test-suite/rv32i_m/ --env ../../riscv-test-suite/env
- name: Config and run riscof for RV64
run: |
cd riscof-plugins/rv64
riscof run --config config.ini --suite ../../riscv-test-suite/rv64i_m/ --env ../../riscv-test-suite/env