forked from chipsalliance/riscv-vector-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.91 KB
/
build-and-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
name: Build and Test
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-go@v4
- name: Install Dependencies
run: |
sudo apt-get install device-tree-compiler
- name: Get Spike Cache Key
id: get-spike-cache-key
run: |
echo "key=5a1145742e701597eb45825855311dfad21232a6" >> $GITHUB_OUTPUT
- name: Cache Spike
id: cache-spike
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/riscv
key: ${{ runner.os }}-${{ steps.get-spike-cache-key.outputs.key }}-spike
- name: Install Toolchain
if: steps.cache-spike.outputs.cache-hit != 'true'
run: |
wget -O- -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.04.12/riscv64-elf-ubuntu-22.04-gcc-nightly-2024.04.12-nightly.tar.gz | tar -xzf -
- name: Build Spike
if: steps.cache-spike.outputs.cache-hit != 'true'
run: |
git clone https://github.com/riscv-software-src/riscv-isa-sim.git
cd riscv-isa-sim
git reset --hard 91793ed7d964aa0031c5a9a31fa05ec3d11b3b0f
mkdir build
cd build
../configure --prefix=${{ github.workspace }}/riscv
make -j4
sudo make install
- name: Build and Test
run: |
export PATH="${{ github.workspace }}/riscv/bin:$PATH"
export RISCV="${{ github.workspace }}/riscv"
make generate-stage1
make all -j4
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: Final sources and binaries
path: |
out/v512x64machine/tests/stage2/*
out/v512x64machine/bin/stage2/*