Skip to content

Commit 02847ce

Browse files
committed
Improve GitHub pipeline.
1 parent 0057637 commit 02847ce

File tree

3 files changed

+424
-246
lines changed

3 files changed

+424
-246
lines changed

.github/workflows/Pipeline.yml

Lines changed: 60 additions & 244 deletions
Original file line numberDiff line numberDiff line change
@@ -6,278 +6,94 @@ on:
66

77
jobs:
88
Prepare:
9-
uses: pyTooling/Actions/.github/workflows/PrepareJob.yml@dev
9+
uses: pyTooling/Actions/.github/workflows/PrepareJob.yml@r5
10+
with:
11+
main_branch: 'master'
12+
release_branch: 'master'
1013

11-
Build-OSVVM:
12-
name: Build OSVVM
14+
Simulate:
15+
uses: ./.github/workflows/Simulate.yml
1316
strategy:
1417
fail-fast: false
1518
matrix:
1619
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'}
20-
runs-on: ubuntu-24.04
21-
steps:
22-
- name: ⏬ Checkout repository
23-
uses: actions/checkout@v4
24-
with:
25-
lfs: true
26-
submodules: true
27-
28-
- name: 🔧 Install tcllib
29-
run: sudo apt-get install -y --no-install-recommends tcllib
30-
31-
- name: Setup GHDL ${{ matrix.backend }}
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'
41-
with:
42-
version: latest
43-
44-
- name: Prepare
45-
run: |
46-
mkdir -p temp/${{ matrix.simulator }}
47-
48-
- name: 🔨 Prepare Script
49-
run: |
50-
cd temp/${{ matrix.simulator }}
51-
52-
tee run.tcl <<EOF
53-
source ../../lib/OSVVM-Scripts/${{ matrix.startScript }}
54-
build ../../lib/OsvvmLibraries.pro OsvvmLibraries
55-
EOF
56-
57-
- name: Precompile OSVVM GHDL
58-
if: matrix.simulator == 'ghdl'
59-
run: |
60-
cd temp/${{ matrix.simulator }}
61-
tclsh run.tcl
62-
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
70-
uses: pyTooling/upload-artifact@v4
71-
continue-on-error: true
72-
with:
73-
name: ${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM-Report
74-
working-directory: temp/${{ matrix.simulator }}
75-
path: |
76-
logs
77-
reports
78-
*.html
79-
*.xml
80-
*.yml
81-
retention-days: 1
82-
83-
- name: 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM' artifacts
84-
uses: pyTooling/upload-artifact@v4
85-
with:
86-
name: ${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM
87-
working-directory: temp/${{ matrix.simulator }}
88-
path: |
89-
VHDL_LIBS
90-
retention-days: 1
91-
92-
- name: 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM-Generated' artifacts
93-
uses: pyTooling/upload-artifact@v4
94-
continue-on-error: true
95-
with:
96-
name: ${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM-Generated
97-
path: |
98-
lib/osvvm/*_generated.vhd
99-
retention-days: 1
20+
- { simulator: 'nvc', backend: '', version: 'latest' }
21+
- { simulator: 'ghdl', backend: 'mcode', version: 'latest' }
22+
- { simulator: 'ghdl', backend: 'llvm', version: 'latest' }
23+
with:
24+
simulator: ${{ matrix.simulator }}
25+
ghdl-version: ${{ matrix.version }}
26+
ghdl-backend: ${{ matrix.backend }}
27+
nvc-version: ${{ matrix.version }}
10028

101-
Build-PoC:
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'}
110-
runs-on: ubuntu-24.04
29+
PublishTestResults:
30+
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r5
11131
needs:
112-
- Build-OSVVM
32+
- Simulate
33+
if: success() || failure()
34+
with:
35+
unittest_artifacts_pattern: 'PoC-Report-XML-*'
36+
testsuite-summary-name: 'The PoC Library'
37+
merge-input-dialect: 'Any-JUnit'
38+
merged_junit_filename: 'unittest.xml'
39+
merged_junit_artifact: 'PoC-Report-XML'
40+
dorny: ${{ inputs.dorny }}
41+
# codecov: ${{ inputs.codecov }}
42+
# secrets:
43+
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
44+
45+
IntermediateCleanUp:
46+
name: 🗑️ Intermediate Artifact Cleanup
47+
runs-on: 'ubuntu-24.04'
48+
needs:
49+
- Simulate
50+
- PublishTestResults
51+
if: success() || failure()
11352
steps:
114-
- name: ⏬ Checkout repository
115-
uses: actions/checkout@v4
116-
with:
117-
lfs: true
118-
submodules: true
119-
120-
- name: 🔧 Install tcllib
121-
run: sudo apt-get install -y --no-install-recommends tcllib
122-
123-
- name: Setup GHDL ${{ matrix.backend }}
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'
133-
with:
134-
version: latest
135-
136-
- name: Prepare
137-
run: |
138-
mkdir -p temp/${{ matrix.simulator }}
139-
140-
mv src/common/my_project.vhdl.template tb/common/my_project.vhdl
141-
142-
- name: 📥 Download artifacts '${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM' from 'Build-OSVVM' job
143-
uses: pyTooling/download-artifact@v4
144-
with:
145-
name: ${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM
146-
path: temp/${{ matrix.simulator }}
147-
148-
- name: 📥 Download artifacts '${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM-Generated' from 'Build-OSVVM' job
149-
uses: pyTooling/download-artifact@v4
150-
with:
151-
name: ${{ matrix.simulator }}-${{ matrix.backend }}-OSVVM-Generated
152-
153-
- name: 🔨 Generate run.tcl for pre-compile
154-
run: |
155-
ls -lAh lib/osvvm/*_generated.vhd
156-
157-
cd temp/${{ matrix.simulator }}
158-
159-
tee run.tcl <<EOF
160-
source ../../lib/OSVVM-Scripts/${{ matrix.startScript }}
161-
162-
namespace eval ::poc {
163-
variable myConfigFile "../tb/common/my_config_GENERIC.vhdl"
164-
variable myProjectFile "../tb/common/my_project.vhdl"
165-
variable vendor "GENERIC"; # GENERIC for vendor-less build; Xilinx, Altera,... for vendor specific build
166-
}
167-
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-
}
175-
176-
build ../../src/PoC.pro PoC
177-
EOF
178-
179-
- name: Precompile PoC GHDL
180-
if: matrix.simulator == 'ghdl'
181-
run: |
182-
cd temp/${{ matrix.simulator }}
183-
tclsh run.tcl
184-
185-
- name: Precompile PoC NVC
186-
if: matrix.simulator == 'nvc'
187-
run: |
188-
cd temp/${{ matrix.simulator }}
189-
nvc --do run.tcl
190-
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 }}
199-
200-
namespace eval ::poc {
201-
variable myConfigFile "../tb/common/my_config_GENERIC.vhdl"
202-
variable myProjectFile "../tb/common/my_project.vhdl"
203-
variable vendor "GENERIC"; # GENERIC for vendor-less build; Xilinx, Altera,... for vendor specific build
204-
}
205-
206-
if {$::osvvm::ToolName eq "GHDL"} {
207-
SetExtendedSimulateOptions {-frelaxed -Wno-specs -Wno-binding}
208-
}
209-
210-
if {$::osvvm::ToolName eq "NVC"} {
211-
}
212-
213-
build ../../tb/RunAllTests.pro
214-
EOF
215-
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
227-
228-
- name: 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }}-PoC-Report' artifacts
229-
if: always()
230-
uses: pyTooling/upload-artifact@v4
53+
- name: 🗑️ Delete YAML artifacts from matrix jobs
54+
uses: geekyeggo/delete-artifact@v5
23155
continue-on-error: true
23256
with:
233-
name: ${{ matrix.simulator }}-${{ matrix.backend }}-PoC-Report
234-
working-directory: temp/${{ matrix.simulator }}
235-
path: |
236-
logs
237-
reports
238-
*.html
239-
*.yml
240-
retention-days: 1
57+
name: |
58+
OSVVM-Report-YAML-*
59+
PoC-Report-YAML-*
24160
242-
- name: 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }}-PoC-Report-XML' artifacts
243-
if: always()
244-
uses: pyTooling/upload-artifact@v4
61+
- name: 🗑️ Delete JUnit XML artifacts from matrix jobs
62+
uses: geekyeggo/delete-artifact@v5
24563
continue-on-error: true
24664
with:
247-
name: ${{ matrix.simulator }}-${{ matrix.backend }}-PoC-Report-XML
248-
working-directory: temp/${{ matrix.simulator }}
249-
path: |
250-
*.xml
251-
retention-days: 1
252-
253-
- name: 📤 Upload '${{ matrix.simulator }}-${{ matrix.backend }}-PoC' artifacts
254-
if: always()
255-
uses: pyTooling/upload-artifact@v4
256-
with:
257-
name: ${{ matrix.simulator }}-${{ matrix.backend }}-PoC
258-
working-directory: temp/${{ matrix.simulator }}
259-
path: |
260-
VHDL_LIBS
261-
retention-days: 1
65+
name: |
66+
OSVVM-Report-XML-*
67+
PoC-Report-XML-*
26268
26369
Documentation:
26470
uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@r5
26571
needs:
266-
- Build-PoC
72+
- PublishTestResults
26773
if: success() || failure()
26874
with:
26975
requirements: '-r docs/requirements.txt'
27076
doc_directory: 'docs'
271-
unittest_xml_artifact: 'ghdl-llvm-PoC-Report-XML'
77+
unittest_xml_artifact: 'PoC-Report-XML'
27278
html_artifact: 'PoC-HTML'
27379
latex_artifact: 'PoC-LaTeX'
27480

81+
PDFDocumentation:
82+
uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@r5
83+
needs:
84+
- Documentation
85+
if: needs.Documentation.result == 'success'
86+
with:
87+
document: 'The-PoC-Library'
88+
latex_artifact: 'PoC-LaTeX'
89+
pdf_artifact: 'PoC-PDF'
90+
27591
PublishToGitHubPages:
27692
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r5
27793
needs:
27894
- Documentation
279-
- Build-PoC
280-
if: success() || failure()
95+
- Simulate
96+
if: needs.Documentation.result == 'success'
28197
with:
28298
doc: 'PoC-HTML'
28399
# coverage: 'PoC-Coverage-HTML'

0 commit comments

Comments
 (0)