Skip to content

Commit d1dfc7c

Browse files
authored
Merge pull request #1259 from patrick-rivos/spike-ci
Add github action ci to make-report using the spike simulator
2 parents eb1ee1b + 3ea87a1 commit d1dfc7c

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.github/setup-apt.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ dpkg --add-architecture i386
55
apt update
66
apt install -y autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev \
77
libgmp-dev gawk build-essential bison flex texinfo gperf libtool \
8-
patchutils bc zlib1g-dev libexpat-dev git ninja-build expect
8+
patchutils bc zlib1g-dev libexpat-dev git ninja-build expect \
9+
device-tree-compiler

.github/workflows/build.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,37 @@ jobs:
6565
name: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}
6666
path: riscv.tar.gz
6767

68+
test-sim:
69+
runs-on: ${{ matrix.os }}
70+
strategy:
71+
matrix:
72+
os: [ubuntu-20.04]
73+
mode: [newlib, linux]
74+
target: [rv64gc-lp64d]
75+
sim: [spike]
76+
exclude:
77+
- sim: spike
78+
mode: linux
79+
steps:
80+
- uses: actions/checkout@v2
81+
82+
- name: initialize submodules
83+
run: |
84+
git submodule init
85+
git submodule update --recursive --progress --recommend-shallow
86+
87+
- name: install dependencies
88+
run: sudo ./.github/setup-apt.sh
89+
90+
- name: build toolchain
91+
run: |
92+
TARGET_TUPLE=($(echo ${{ matrix.target }} | tr "-" "\n"))
93+
./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]} --with-sim=${{ matrix.sim }}
94+
make -j $(nproc) ${{ matrix.mode }}
95+
96+
- name: make report
97+
run: make report-${{ matrix.mode }} -j $(nproc)
98+
6899
build-multilib:
69100
if: ${{ false }} # Disable until multilib errors are triaged
70101
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)