forked from riscv/riscv-unified-db
-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·229 lines (229 loc) · 7.26 KB
/
regress.yml
File metadata and controls
executable file
·229 lines (229 loc) · 7.26 KB
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
name: Regression test
permissions:
contents: read
pull-requests: write
on:
merge_group:
types: [checks_requested]
pull_request:
branches:
- main
workflow_dispatch:
jobs:
regress-pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.1
regress-smoke:
needs: build-llvm
runs-on: ubuntu-latest
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Get current LLVM submodule commit SHA
id: get-llvm-sha
run: echo "LLVM_SHA=$(git ls-tree HEAD ext/llvm-project | awk '{print $3}')" >> $GITHUB_ENV
- name: Restore cache RISC-V JSON
id: cache-riscv
uses: actions/cache@v4
with:
path: ext/llvm-project/riscv.json
key: ${{ runner.os }}-riscv-json-${{ env.LLVM_SHA }}
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Run smoke
run: ./do test:smoke
- name: Upload idlc coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
files: tools/ruby-gems/idlc/coverage/coverage.xml
flags: idlc
regress-gen-isa-manual:
runs-on: ubuntu-latest
env:
MANUAL_NAME: isa
VERSIONS: all
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Generate HTML ISA manual
run: ./do gen:html_manual
regress-gen-instruction-appendix:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Generate instruction appendix asciidoc
run: ./do gen:instruction_appendix_adoc
- name: Check instruction appendix result
run: ./do test:instruction_appendix
regress-cfg-manual:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Generate HTML ISA manual
run: ./do gen:html[example_rv64_with_overlay]
regress-gen-ext-pdf:
runs-on: ubuntu-latest
env:
EXT: B
VERSION: latest
SINGULARITY: 1
PSEUDO: both
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Generate extension PDF
run: ./do gen:ext_pdf
regress-gen-certificate:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Generate extension PDF
run: ./do gen:proc_crd_pdf[MockProcessor]
regress-gen-profile:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Generate extension PDF
run: ./do gen:profile_release_pdf[Mock]
build-llvm:
runs-on: ubuntu-latest
steps:
- name: Check out repository (no submodules, shallow fetch)
uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 1
- name: Get current LLVM submodule commit SHA
id: get-llvm-sha
run: echo "LLVM_SHA=$(git ls-tree HEAD ext/llvm-project | awk '{print $3}')" >> $GITHUB_ENV
- name: Cache RISC-V JSON
id: cache-riscv
uses: actions/cache@v4
with:
path: ext/llvm-project/riscv.json
key: ${{ runner.os }}-riscv-json-${{ env.LLVM_SHA }}
- name: Initialize LLVM submodule (shallow + sparse)
if: ${{ steps.cache-riscv.outputs.cache-hit != 'true' }}
run: |
rm -rf ext/llvm-project
git submodule sync --recursive
git submodule update --init --recursive --depth=1 ext/llvm-project
- name: Check for required directories and files
if: ${{ steps.cache-riscv.outputs.cache-hit != 'true' }}
run: |
ls -l ext/llvm-project/llvm/include
ls -l ext/llvm-project/llvm/lib/Target/RISCV
ls -l ext/llvm-project/llvm/lib/Target/RISCV/RISCV.td
- name: Configure and build llvm-tblgen
if: ${{ steps.cache-riscv.outputs.cache-hit != 'true' }}
run: |
cmake -S ext/llvm-project/llvm -B ext/llvm-project/build -DCMAKE_BUILD_TYPE=Release
cmake --build ext/llvm-project/build --target llvm-tblgen
- name: Generate RISC-V JSON
if: ${{ steps.cache-riscv.outputs.cache-hit != 'true' }}
run: |
chmod +x ./ext/llvm-project/build/bin/llvm-tblgen
./ext/llvm-project/build/bin/llvm-tblgen \
-I ext/llvm-project/llvm/include \
-I ext/llvm-project/llvm/lib/Target/RISCV \
ext/llvm-project/llvm/lib/Target/RISCV/RISCV.td \
--dump-json \
-o ext/llvm-project/riscv.json
- name: Show riscv.json output
run: ls -l ext/llvm-project/riscv.json
- name: Upload RISC-V JSON as Artifact
uses: actions/upload-artifact@v4
with:
name: riscv-json
path: ext/llvm-project/riscv.json
regress-gen-go:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Generate Go code
run: ./do gen:go
regress-gen-c-header:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Generate c_header code
run: ./do gen:c_header
regress-cpp-unit:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Run cpp unit tests
run: ./do test:cpp_hart CONFIG=rv64 JOBS=4
regress-riscv-tests:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Run riscv-tests
run: ./do test:riscv_tests CONFIG=rv32 JOBS=4
regress-xqci-doc:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Run cpp unit tests
run: ./do gen:ext_pdf EXT=Xqci CFG=qc_iu.yaml VERSION=latest
call-deploy:
uses: ./.github/workflows/deploy.yml
with:
dry-run: true