-
Notifications
You must be signed in to change notification settings - Fork 3
121 lines (121 loc) · 3.26 KB
/
ci.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: CI
on:
push:
schedule:
- cron: '10 * * * *'
jobs:
build-socs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 8
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-04-24
default: true
- name: Build FSBL
run: |
set -e
sudo apt-get install -y llvm
rustup component add rust-src
cargo install cargo-xbuild
cd fsbl
./build.sh 64
./build.sh 32
- name: Generate
run: |
sbt "runMain magicore.isa.riscv.soc.Gen_All"
mkdir output
cp ./*.v ./*.bin ./output/
- name: Upload
uses: actions/upload-artifact@v2
with:
name: socs
path: ./output
system-test:
runs-on: ubuntu-20.04
needs: build-socs
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch RTL
uses: actions/download-artifact@v2
with:
name: socs
path: socs
- name: List RTL
run: |
ls -lash socs
- name: Install dependencies
run: pip3 install -r ./validation/requirements.txt
- name: Install verilator
run: |
sudo apt-get install -y git perl python3 make autoconf g++ flex bison ccache libgoogle-perftools-dev numactl perl-doc libfl-dev libfl2 zlibc zlib1g zlib1g-dev
git clone https://github.com/verilator/verilator
cd verilator
git checkout v4.106
autoconf
./configure
make -j `nproc`
sudo make install
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 8
- name: Install iverilog
run: sudo apt-get install -y build-essential libboost-dev iverilog
- name: Install verilator
run: |
sudo apt-get install -y git perl python3 make autoconf g++ flex bison ccache libgoogle-perftools-dev numactl perl-doc libfl-dev libfl2 zlibc zlib1g zlib1g-dev
git clone https://github.com/verilator/verilator
cd verilator
git checkout stable
autoconf
./configure
make -j `nproc`
sudo make install
- name: Test
run: sbt test
release:
name: Create release
runs-on: ubuntu-20.04
needs:
- build-socs
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: socs
path: socs
- name: Package
run: |
set -e
./scripts/package_once.sh MagiSoC_RV32IM
./scripts/package_once.sh MagiSoC_RV32IMA
./scripts/package_once.sh MagiSoC_RV64IMA
./scripts/package_once.sh MagiSoC_RV64IMA_Bus32
ls -lash *.tar.xz
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: |
MagiSoC_RV32IM.tar.xz
MagiSoC_RV32IMA.tar.xz
MagiSoC_RV64IMA.tar.xz
MagiSoC_RV64IMA_Bus32.tar.xz