-
Notifications
You must be signed in to change notification settings - Fork 23
executable file
·225 lines (222 loc) · 7.56 KB
/
regress.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
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
name: Regression test
on:
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/[email protected]
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 }}
restore-keys: |
${{ runner.os }}-riscv-json-
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v4
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v4
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Setup project
run: ./bin/setup
- name: Run smoke
run: ./do test:smoke
regress-gen-isa-manual:
runs-on: ubuntu-latest
needs: regress-smoke
env:
MANUAL_NAME: isa
VERSIONS: all
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v4
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v4
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Generate HTML ISA manual
run: ./do gen:html_manual
regress-gen-ext-pdf:
runs-on: ubuntu-latest
needs: regress-smoke
env:
EXT: B
VERSION: latest
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v4
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v4
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Generate extension PDF
run: ./do gen:ext_pdf
regress-gen-certificate:
runs-on: ubuntu-latest
needs: regress-smoke
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v4
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v4
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Generate extension PDF
run: ./do gen:cert_model_pdf[MockCertificateModel]
regress-gen-profile:
runs-on: ubuntu-latest
needs: regress-smoke
env:
SINGULARITY: 1
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v4
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v4
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Generate extension PDF
run: ./do gen:profile[MockProfileRelease]
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 }}
restore-keys: |
${{ runner.os }}-riscv-json-
- name: Initialize LLVM submodule (shallow + sparse)
if: ${{ steps.cache-riscv.outputs.cache-hit != 'true' }}
run: |
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