forked from chipsalliance/rocket-chip
-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (117 loc) · 3.83 KB
/
continuous-integration.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# This file describes the GitHub Actions workflow for continuous integration of rocket-chip.
#
# See
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# for API reference documentation on this file format.
name: Continuous Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
check-wit:
name: Check Wit Manifest
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- run: ci-tests/check_submodules
prepare-riscv-tools-cache:
name: Prepare riscv-tools Cache
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- id: cache
uses: actions/cache@v2
with:
path: |
./regression/install
./regression/stamps/rocket-tools_checkout.stamp
key: riscv-tools-${{ hashFiles('./riscv-tools.hash') }}-v1
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: sudo xargs apt-get install -y < .github/workflows/apt-packages.txt
- if: steps.cache.outputs.cache-hit != 'true'
env:
CXX: g++-4.8
CC: gcc-4.8
run: make tools -C regression SUITE=none
prepare-verilator-cache:
name: Prepare Verilator Cache
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ./emulator/verilator
key: verilator-${{ hashFiles('./verilator.hash') }}-v1
# WARNING: The version of gcc used to compile Verilator MUST match the
# version of gcc used to compile the fesvr. There is some bug related to
# some C struct not being ABI-compatible across gcc 4 and 5, which we have
# not debugged yet.
- name: Install Dependencies
run: sudo xargs apt-get install -y < .github/workflows/apt-packages.txt
- env:
CXX: g++-4.8
CC: gcc-4.8
run: make verilator -C regression SUITE=none
check-wake-compilation:
name: Check Wake Compilation
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: Use SBT Cache
uses: actions/cache@v2
with:
path: |
~/.cache/coursier
~/.sbt
key: sbt-${{ hashFiles('**/build.sbt') }}-v1
- run: ci-tests/wake_scala_compilation
# This job is defined as a matrix job, where the definitions of each test
# bucket is located in a shell script at ./regression/run-test-bucket.
test:
name: Test
runs-on: ubuntu-16.04
needs: [prepare-riscv-tools-cache, prepare-verilator-cache]
strategy:
fail-fast: false
matrix:
bucket: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
steps:
- uses: actions/checkout@v2
- name: Use riscv-tools Cache
uses: actions/cache@v2
with:
path: |
./regression/install
./regression/stamps/rocket-tools_checkout.stamp
key: riscv-tools-${{ hashFiles('./riscv-tools.hash') }}-v1
- name: Use Verilator Cache
uses: actions/cache@v2
with:
path: ./emulator/verilator
key: verilator-${{ hashFiles('./verilator.hash') }}-v1
- name: Use SBT Cache
uses: actions/cache@v2
with:
path: |
~/.cache/coursier
~/.sbt
key: sbt-${{ hashFiles('**/build.sbt') }}-v1
- name: Install Dependencies
run: |
sudo xargs apt-get install -y < .github/workflows/apt-packages.txt
python3 -m pip install pexpect==4.3.1
- env:
CXX: g++-4.8
CC: gcc-4.8
run: ./regression/run-test-bucket ${{ matrix.bucket }}
- if: failure()
name: Upload Artifacts on Failure
uses: actions/upload-artifact@v1
with:
name: test-bucket-${{ matrix.bucket }}-failures
path: emulator/output