-
Notifications
You must be signed in to change notification settings - Fork 14
80 lines (66 loc) · 2.22 KB
/
atomsim.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
name: atomsim
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
VERILATOR_PREBUILT_FILEID: 1rXszcRib7oryDU2sMhZpPxMn5Ev3RbxG
VERILATOR_INSTALL_PATH: /opt/verilator
RVTOOLCHAIN_PREBUILT_FILEID: 1kSxCHqrfe7jrk32N3W_e1YbHj97-EsaN
RVTOOLCHAIN_INSTALL_PATH: /opt/riscv
jobs:
Build:
name: atomsim
runs-on: ubuntu-20.04
steps:
- name: Checkout RISCV-Atom Repo
uses: actions/checkout@v3
with:
path: riscv-atom
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Prerequisites
run: |
pip install gdown
sudo apt-get install ccache
- name: Install Verilator
run: |
gdown ${VERILATOR_PREBUILT_FILEID}
sudo mkdir -p ${VERILATOR_INSTALL_PATH}
sudo tar -xvf verilator_5p006.tar.gz -C ${VERILATOR_INSTALL_PATH}
- name: Install riscv-gnu-toolchain (64-bit, multilib)
run: |
gdown ${RVTOOLCHAIN_PREBUILT_FILEID} -O rv64_mutilib.tar.gz
sudo mkdir -p ${RVTOOLCHAIN_INSTALL_PATH}
sudo tar -xvf rv64_mutilib.tar.gz -C ${RVTOOLCHAIN_INSTALL_PATH}
- name: Setup Environment
working-directory: riscv-atom
run: |
echo "${VERILATOR_INSTALL_PATH}/bin" >> $GITHUB_PATH
echo "${RVTOOLCHAIN_INSTALL_PATH}/bin" >> $GITHUB_PATH
echo "RVATOM=$GITHUB_WORKSPACE/riscv-atom" >> $GITHUB_ENV
- name: Build Atomsim - atombones
working-directory: riscv-atom
run: |
source sourceme
make soctarget=atombones clean sim
- name: Run Atomsim - atombones
working-directory: riscv-atom
run: |
source sourceme
make soctarget=atombones test
- name: Build AtomSim - hydrogensoc
working-directory: riscv-atom
run: |
source sourceme
make soctarget=hydrogensoc clean sim
- name: Run AtomSim - hydrogensoc
working-directory: riscv-atom
run: |
source sourceme
make soctarget=hydrogensoc test