5
5
pull_request :
6
6
7
7
jobs :
8
+ Prepare :
9
+ uses : pyTooling/Actions/.github/workflows/PrepareJob.yml@dev
10
+
8
11
Build-OSVVM :
9
12
name : Build OSVVM
13
+ strategy :
14
+ fail-fast : false
15
+ matrix :
16
+ include :
17
+ - {simulator: 'nvc', backend: 'llvm', startScript: 'StartNVC.tcl'}
18
+ - {simulator: 'ghdl', backend: 'mcode', startScript: 'StartGHDL.tcl'}
19
+ - {simulator: 'ghdl', backend: 'llvm', startScript: 'StartGHDL.tcl'}
10
20
runs-on : ubuntu-24.04
11
21
steps :
12
22
- name : ⏬ Checkout repository
@@ -18,34 +28,50 @@ jobs:
18
28
- name : 🔧 Install tcllib
19
29
run : sudo apt-get install -y --no-install-recommends tcllib
20
30
21
- - name : Setup GHDL ${{ inputs.ghdl_backend }}
31
+ - name : Setup GHDL ${{ matrix.backend }}
22
32
uses : ghdl/setup-ghdl@v1
33
+ if : matrix.simulator == 'ghdl'
34
+ with :
35
+ version : latest
36
+ backend : ${{ matrix.backend }}
37
+
38
+ - name : Setup NVC
39
+ uses : nickg/setup-nvc@v1
40
+ if : matrix.simulator == 'nvc'
23
41
with :
24
42
version : latest
25
- backend : llvm
26
43
27
44
- name : Prepare
28
45
run : |
29
- mkdir -p temp/ghdl
46
+ mkdir -p temp/${{ matrix.simulator }}
30
47
31
- - name : 🔨 Pre-compile OSVVM
48
+ - name : 🔨 Prepare Script
32
49
run : |
33
- cd temp/ghdl
50
+ cd temp/${{ matrix.simulator }}
34
51
35
52
tee run.tcl <<EOF
36
- source ../../lib/OSVVM-Scripts/StartGHDL.tcl
53
+ source ../../lib/OSVVM-Scripts/${{ matrix.startScript }}
37
54
build ../../lib/OsvvmLibraries.pro OsvvmLibraries
38
55
EOF
39
- printf "=================\n"
40
56
57
+ - name : Precompile OSVVM GHDL
58
+ if : matrix.simulator == 'ghdl'
59
+ run : |
60
+ cd temp/${{ matrix.simulator }}
41
61
tclsh run.tcl
42
62
43
- - name : 📤 Upload 'GHDL-OSVVM-Report' artifacts
63
+ - name : Precompile OSVVM NVC
64
+ if : matrix.simulator == 'nvc'
65
+ run : |
66
+ cd temp/${{ matrix.simulator }}
67
+ nvc --do run.tcl
68
+
69
+ - name : 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM-Report' artifacts
44
70
uses : pyTooling/upload-artifact@v4
45
71
continue-on-error : true
46
72
with :
47
- name : GHDL -OSVVM-Report
48
- working-directory : temp/ghdl
73
+ name : ${{ matrix.simulator }}-${{ matrix.backend }} -OSVVM-Report
74
+ working-directory : temp/${{ matrix.simulator }}
49
75
path : |
50
76
logs
51
77
reports
@@ -54,27 +80,33 @@ jobs:
54
80
*.yml
55
81
retention-days : 1
56
82
57
- - name : 📤 Upload 'GHDL -OSVVM' artifacts
83
+ - name : 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }} -OSVVM' artifacts
58
84
uses : pyTooling/upload-artifact@v4
59
85
with :
60
- name : GHDL -OSVVM
61
- working-directory : temp/ghdl
86
+ name : ${{ matrix.simulator }}-${{ matrix.backend }} -OSVVM
87
+ working-directory : temp/${{ matrix.simulator }}
62
88
path : |
63
89
VHDL_LIBS
64
90
retention-days : 1
65
91
66
- - name : 📤 Upload 'GHDL -OSVVM-Generated' artifacts
92
+ - name : 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }} -OSVVM-Generated' artifacts
67
93
uses : pyTooling/upload-artifact@v4
68
94
continue-on-error : true
69
95
with :
70
- name : GHDL-OSVVM-Generated
71
- # working-directory: temp/ghdl
96
+ name : ${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM-Generated
72
97
path : |
73
98
lib/osvvm/*_generated.vhd
74
99
retention-days : 1
75
100
76
101
Build-PoC :
77
102
name : Build PoC
103
+ strategy :
104
+ fail-fast : false
105
+ matrix :
106
+ include :
107
+ - {simulator: 'nvc', backend: 'llvm', startScript: 'StartNVC.tcl'}
108
+ - {simulator: 'ghdl', backend: 'mcode', startScript: 'StartGHDL.tcl'}
109
+ - {simulator: 'ghdl', backend: 'llvm', startScript: 'StartGHDL.tcl'}
78
110
runs-on : ubuntu-24.04
79
111
needs :
80
112
- Build-OSVVM
@@ -88,148 +120,198 @@ jobs:
88
120
- name : 🔧 Install tcllib
89
121
run : sudo apt-get install -y --no-install-recommends tcllib
90
122
91
- - name : Setup GHDL ${{ inputs.ghdl_backend }}
123
+ - name : Setup GHDL ${{ matrix.backend }}
92
124
uses : ghdl/setup-ghdl@v1
125
+ if : matrix.simulator == 'ghdl'
126
+ with :
127
+ version : latest
128
+ backend : ${{ matrix.backend }}
129
+
130
+ - name : Setup NVC
131
+ uses : nickg/setup-nvc@v1
132
+ if : matrix.simulator == 'nvc'
93
133
with :
94
134
version : latest
95
- backend : llvm
96
135
97
136
- name : Prepare
98
137
run : |
99
- mkdir -p temp/ghdl
138
+ mkdir -p temp/${{ matrix.simulator }}
100
139
101
140
mv src/common/my_project.vhdl.template tb/common/my_project.vhdl
102
141
103
- - name : 📥 Download artifacts 'GHDL -OSVVM' from 'Build-OSVVM' job
142
+ - name : 📥 Download artifacts '${{ matrix.simulator }}-${{ matrix.backend }} -OSVVM' from 'Build-OSVVM' job
104
143
uses : pyTooling/download-artifact@v4
105
144
with :
106
- name : GHDL -OSVVM
107
- path : temp/ghdl
145
+ name : ${{ matrix.simulator }}-${{ matrix.backend }} -OSVVM
146
+ path : temp/${{ matrix.simulator }}
108
147
109
- - name : 📥 Download artifacts 'GHDL -OSVVM-Generated' from 'Build-OSVVM' job
148
+ - name : 📥 Download artifacts '${{ matrix.simulator }}-${{ matrix.backend }} -OSVVM-Generated' from 'Build-OSVVM' job
110
149
uses : pyTooling/download-artifact@v4
111
150
with :
112
- name : GHDL-OSVVM-Generated
113
- # path: temp/ghdl
151
+ name : ${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM-Generated
114
152
115
- - name : 🔨 Pre -compile PoC
153
+ - name : 🔨 Generate run.tcl for pre -compile
116
154
run : |
117
155
ls -lAh lib/osvvm/*_generated.vhd
118
156
119
- cd temp/ghdl
157
+ cd temp/${{ matrix.simulator }}
120
158
121
159
tee run.tcl <<EOF
122
- source ../../lib/OSVVM-Scripts/StartGHDL.tcl
160
+ source ../../lib/OSVVM-Scripts/${{ matrix.startScript }}
123
161
124
162
namespace eval ::poc {
125
163
variable myConfigFile "../tb/common/my_config_GENERIC.vhdl"
126
164
variable myProjectFile "../tb/common/my_project.vhdl"
127
165
variable vendor "GENERIC"; # GENERIC for vendor-less build; Xilinx, Altera,... for vendor specific build
128
166
}
129
167
130
- set ::osvvm::AnalyzeErrorStopCount 1
131
- SetExtendedAnalyzeOptions {-frelaxed -Wno-specs}
168
+ if {$::osvvm::ToolName eq "GHDL"} {
169
+ SetExtendedAnalyzeOptions {-frelaxed -Wno-specs -Wno-elaboration}
170
+ }
171
+
172
+ if {$::osvvm::ToolName eq "NVC"} {
173
+ SetExtendedAnalyzeOptions {--relaxed}
174
+ }
132
175
133
176
build ../../src/PoC.pro PoC
134
177
EOF
135
178
136
- printf "=================\n"
179
+ - name : Precompile PoC GHDL
180
+ if : matrix.simulator == 'ghdl'
181
+ run : |
182
+ cd temp/${{ matrix.simulator }}
137
183
tclsh run.tcl
138
184
139
- - name : 📈 Simulate PoC
185
+ - name : Precompile PoC NVC
186
+ if : matrix.simulator == 'nvc'
140
187
run : |
141
- cd temp/ghdl
188
+ cd temp/${{ matrix.simulator }}
189
+ nvc --do run.tcl
142
190
143
- tee run.tcl <<EOF
144
- source ../../lib/OSVVM-Scripts/StartGHDL.tcl
191
+
192
+ - name : 📈 Generate run.tcl for simulate
193
+ if : always()
194
+ run : |
195
+ cd temp/${{ matrix.simulator }}
196
+
197
+ tee run2.tcl <<EOF
198
+ source ../../lib/OSVVM-Scripts/${{ matrix.startScript }}
145
199
146
200
namespace eval ::poc {
147
201
variable myConfigFile "../tb/common/my_config_GENERIC.vhdl"
148
202
variable myProjectFile "../tb/common/my_project.vhdl"
149
203
variable vendor "GENERIC"; # GENERIC for vendor-less build; Xilinx, Altera,... for vendor specific build
150
204
}
151
205
152
- SetExtendedSimulateOptions {-frelaxed -Wno-specs -Wno-binding}
206
+ if {$::osvvm::ToolName eq "GHDL"} {
207
+ SetExtendedSimulateOptions {-frelaxed -Wno-specs -Wno-binding}
208
+ }
209
+
210
+ if {$::osvvm::ToolName eq "NVC"} {
211
+ }
153
212
154
213
build ../../tb/RunAllTests.pro
155
214
EOF
156
215
157
- printf "=================\n"
158
- tclsh run.tcl
216
+ - name : Simulate PoC GHDL
217
+ if : matrix.simulator == 'ghdl'
218
+ run : |
219
+ cd temp/${{ matrix.simulator }}
220
+ tclsh run2.tcl
221
+
222
+ - name : Simulate PoC NVC
223
+ if : always() && matrix.simulator == 'nvc'
224
+ run : |
225
+ cd temp/${{ matrix.simulator }}
226
+ nvc --do run2.tcl
159
227
160
- - name : 📤 Upload 'GHDL-PoC-Report' artifacts
228
+ - name : 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }}-PoC-Report' artifacts
229
+ if : always()
161
230
uses : pyTooling/upload-artifact@v4
162
231
continue-on-error : true
163
232
with :
164
- name : GHDL -PoC-Report
165
- working-directory : temp/ghdl
233
+ name : ${{ matrix.simulator }}-${{ matrix.backend }} -PoC-Report
234
+ working-directory : temp/${{ matrix.simulator }}
166
235
path : |
167
236
logs
168
237
reports
169
238
*.html
170
239
*.yml
171
240
retention-days : 1
172
241
173
- - name : 📤 Upload 'GHDL-PoC-Report-XML' artifacts
242
+ - name : 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }}-PoC-Report-XML' artifacts
243
+ if : always()
174
244
uses : pyTooling/upload-artifact@v4
175
245
continue-on-error : true
176
246
with :
177
- name : GHDL -PoC-Report-XML
178
- working-directory : temp/ghdl
247
+ name : ${{ matrix.simulator }}-${{ matrix.backend }} -PoC-Report-XML
248
+ working-directory : temp/${{ matrix.simulator }}
179
249
path : |
180
250
*.xml
181
251
retention-days : 1
182
252
183
- - name : 📤 Upload 'GHDL-PoC' artifacts
253
+ - name : 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }}-PoC' artifacts
254
+ if : always()
184
255
uses : pyTooling/upload-artifact@v4
185
256
with :
186
- name : GHDL -PoC
187
- working-directory : temp/ghdl
257
+ name : ${{ matrix.simulator }}-${{ matrix.backend }} -PoC
258
+ working-directory : temp/${{ matrix.simulator }}
188
259
path : |
189
260
VHDL_LIBS
190
261
retention-days : 1
191
262
192
263
Documentation :
193
- uses : pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@r4
264
+ uses : pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@r5
194
265
needs :
195
266
- Build-PoC
267
+ if : success() || failure()
196
268
with :
197
269
requirements : ' -r docs/requirements.txt'
198
270
doc_directory : ' docs'
199
- unittest_xml_artifact : ' GHDL -PoC-Report-XML'
271
+ unittest_xml_artifact : ' ghdl-llvm -PoC-Report-XML'
200
272
html_artifact : ' PoC-HTML'
201
273
latex_artifact : ' PoC-LaTeX'
202
274
203
275
PublishToGitHubPages :
204
- uses : pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev
276
+ uses : pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r5
205
277
needs :
206
278
- Documentation
207
279
- Build-PoC
280
+ if : success() || failure()
208
281
with :
209
282
doc : ' PoC-HTML'
210
283
# coverage: 'PoC-Coverage-HTML'
211
284
285
+ AutoTag :
286
+ uses : pyTooling/Actions/.github/workflows/TagReleaseCommit.yml@r5
287
+ needs :
288
+ - Prepare
289
+ - PublishToGitHubPages
290
+ if : needs.Prepare.outputs.is_release_commit && github.event_name != 'schedule'
291
+ permissions :
292
+ contents : write # required for create tag
293
+ actions : write # required for trigger workflow
294
+ with :
295
+ version : ${{ needs.Prepare.output.version }}
296
+ auto_tag : ${{ needs.Prepare.outputs.is_release_commit }}
297
+
212
298
Release :
213
- uses : pyTooling/Actions/.github/workflows/NightlyRelease.yml@r4
214
- if : startsWith(github.ref, 'refs/tags/v')
299
+ uses : pyTooling/Actions/.github/workflows/PublishReleaseNotes.yml@r5
215
300
needs :
216
- # - Ubuntu
217
- # - Windows
218
- # - PublishCoverageResults
219
- # - PublishTestResults
220
301
- PublishToGitHubPages
221
- secrets : inherit
302
+ if : needs.Prepare.outputs.is_release_tag == 'true'
222
303
permissions :
223
304
contents : write
224
- actions : write
225
- attestations : write
305
+ actions : write
226
306
with :
227
307
prerelease : true
228
308
replacements : |
229
- poc=1.3.0
230
- nightly_name : " v1.3.0 "
231
- nightly_description : |
309
+ poc=${{ needs.Prepare.outputs.version }}
310
+ tag : ${{ needs.Prepare.outputs.version }}
311
+ description : |
232
312
# The PoC-Library %poc%
233
313
inventory-json : " inventory.json"
234
- inventory-version : " 1.3.0 "
314
+ inventory-version : ${{ needs.Prepare.outputs.version }}
235
315
assets : |
316
+
317
+ secrets : inherit
0 commit comments