|
5 | 5 | pull_request: |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - Build-OSVVM: |
9 | | - name: Build OSVVM |
10 | | - runs-on: ubuntu-24.04 |
11 | | - steps: |
12 | | - - name: ⏬ Checkout repository |
13 | | - uses: actions/checkout@v4 |
14 | | - with: |
15 | | - lfs: true |
16 | | - submodules: true |
17 | | - |
18 | | - - name: 🔧 Install tcllib |
19 | | - run: sudo apt-get install -y --no-install-recommends tcllib |
20 | | - |
21 | | - - name: Setup GHDL ${{ inputs.ghdl_backend }} |
22 | | - uses: ghdl/setup-ghdl@v1 |
23 | | - with: |
24 | | - version: latest |
25 | | - backend: llvm |
26 | | - |
27 | | - - name: Prepare |
28 | | - run: | |
29 | | - mkdir -p temp/ghdl |
30 | | -
|
31 | | - - name: 🔨 Pre-compile OSVVM |
32 | | - run: | |
33 | | - cd temp/ghdl |
34 | | -
|
35 | | - tee run.tcl <<EOF |
36 | | - source ../../lib/OSVVM-Scripts/StartGHDL.tcl |
37 | | - build ../../lib/OsvvmLibraries.pro OsvvmLibraries |
38 | | - EOF |
39 | | - printf "=================\n" |
40 | | -
|
41 | | - tclsh run.tcl |
42 | | -
|
43 | | - - name: 📤 Upload 'GHDL-OSVVM-Report' artifacts |
44 | | - uses: pyTooling/upload-artifact@v4 |
45 | | - continue-on-error: true |
46 | | - with: |
47 | | - name: GHDL-OSVVM-Report |
48 | | - working-directory: temp/ghdl |
49 | | - path: | |
50 | | - logs |
51 | | - reports |
52 | | - *.html |
53 | | - *.xml |
54 | | - *.yml |
55 | | - retention-days: 1 |
56 | | - |
57 | | - - name: 📤 Upload 'GHDL-OSVVM' artifacts |
58 | | - uses: pyTooling/upload-artifact@v4 |
59 | | - with: |
60 | | - name: GHDL-OSVVM |
61 | | - working-directory: temp/ghdl |
62 | | - path: | |
63 | | - VHDL_LIBS |
64 | | - retention-days: 1 |
65 | | - |
66 | | - - name: 📤 Upload 'GHDL-OSVVM-Generated' artifacts |
67 | | - uses: pyTooling/upload-artifact@v4 |
68 | | - continue-on-error: true |
69 | | - with: |
70 | | - name: GHDL-OSVVM-Generated |
71 | | -# working-directory: temp/ghdl |
72 | | - path: | |
73 | | - lib/osvvm/*_generated.vhd |
74 | | - retention-days: 1 |
75 | | - |
76 | | - Build-PoC: |
77 | | - name: Build PoC |
78 | | - runs-on: ubuntu-24.04 |
| 8 | + Prepare: |
| 9 | + uses: pyTooling/Actions/.github/workflows/PrepareJob.yml@r6 |
| 10 | + with: |
| 11 | + main_branch: 'master' |
| 12 | + release_branch: 'master' |
| 13 | + |
| 14 | + Simulate: |
| 15 | + uses: ./.github/workflows/Simulate.yml |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + include: |
| 20 | + - { simulator: 'nvc', backend: '', version: 'latest', can-fail: false } |
| 21 | + - { simulator: 'ghdl', backend: 'mcode', version: 'latest', can-fail: false } |
| 22 | + - { simulator: 'ghdl', backend: 'llvm', version: 'latest', can-fail: false } |
| 23 | + with: |
| 24 | + simulator: ${{ matrix.simulator }} |
| 25 | + ghdl-version: ${{ matrix.version }} |
| 26 | + ghdl-backend: ${{ matrix.backend }} |
| 27 | + nvc-version: ${{ matrix.version }} |
| 28 | + can-fail: ${{ matrix.can-fail }} |
| 29 | + |
| 30 | + PublishTestResults: |
| 31 | + uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r6 |
79 | 32 | needs: |
80 | | - - Build-OSVVM |
| 33 | + - Simulate |
| 34 | +# if: success() || failure() |
| 35 | + with: |
| 36 | + unittest_artifacts_pattern: 'PoC-Report-XML-*' |
| 37 | + testsuite-summary-name: 'The PoC Library' |
| 38 | + merge-input-dialect: 'Any-JUnit' |
| 39 | + merged_junit_filename: 'unittest.xml' |
| 40 | + merged_junit_artifact: 'PoC-Report-XML' |
| 41 | + dorny: ${{ inputs.dorny }} |
| 42 | +# codecov: ${{ inputs.codecov }} |
| 43 | +# secrets: |
| 44 | +# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 45 | + |
| 46 | + IntermediateCleanUp: |
| 47 | + name: 🗑️ Intermediate Artifact Cleanup |
| 48 | + runs-on: 'ubuntu-24.04' |
| 49 | + needs: |
| 50 | + - Simulate |
| 51 | + - PublishTestResults |
| 52 | +# if: success() || failure() |
81 | 53 | steps: |
82 | | - - name: ⏬ Checkout repository |
83 | | - uses: actions/checkout@v4 |
84 | | - with: |
85 | | - lfs: true |
86 | | - submodules: true |
87 | | - |
88 | | - - name: 🔧 Install tcllib |
89 | | - run: sudo apt-get install -y --no-install-recommends tcllib |
90 | | - |
91 | | - - name: Setup GHDL ${{ inputs.ghdl_backend }} |
92 | | - uses: ghdl/setup-ghdl@v1 |
93 | | - with: |
94 | | - version: latest |
95 | | - backend: llvm |
96 | | - |
97 | | - - name: Prepare |
98 | | - run: | |
99 | | - mkdir -p temp/ghdl |
100 | | -
|
101 | | - mv src/common/my_project.vhdl.template tb/common/my_project.vhdl |
102 | | -
|
103 | | - - name: 📥 Download artifacts 'GHDL-OSVVM' from 'Build-OSVVM' job |
104 | | - uses: pyTooling/download-artifact@v4 |
105 | | - with: |
106 | | - name: GHDL-OSVVM |
107 | | - path: temp/ghdl |
108 | | - |
109 | | - - name: 📥 Download artifacts 'GHDL-OSVVM-Generated' from 'Build-OSVVM' job |
110 | | - uses: pyTooling/download-artifact@v4 |
111 | | - with: |
112 | | - name: GHDL-OSVVM-Generated |
113 | | -# path: temp/ghdl |
114 | | - |
115 | | - - name: 🔨 Pre-compile PoC |
116 | | - run: | |
117 | | - ls -lAh lib/osvvm/*_generated.vhd |
118 | | -
|
119 | | - cd temp/ghdl |
120 | | -
|
121 | | - tee run.tcl <<EOF |
122 | | - source ../../lib/OSVVM-Scripts/StartGHDL.tcl |
123 | | -
|
124 | | - namespace eval ::poc { |
125 | | - variable myConfigFile "../tb/common/my_config_GENERIC.vhdl" |
126 | | - variable myProjectFile "../tb/common/my_project.vhdl" |
127 | | - variable vendor "GENERIC"; # GENERIC for vendor-less build; Xilinx, Altera,... for vendor specific build |
128 | | - } |
129 | | -
|
130 | | - set ::osvvm::AnalyzeErrorStopCount 1 |
131 | | - SetExtendedAnalyzeOptions {-frelaxed -Wno-specs} |
132 | | -
|
133 | | - build ../../src/PoC.pro PoC |
134 | | - EOF |
135 | | -
|
136 | | - printf "=================\n" |
137 | | - tclsh run.tcl |
138 | | -
|
139 | | - - name: 📈 Simulate PoC |
140 | | - run: | |
141 | | - cd temp/ghdl |
142 | | -
|
143 | | - tee run.tcl <<EOF |
144 | | - source ../../lib/OSVVM-Scripts/StartGHDL.tcl |
145 | | -
|
146 | | - namespace eval ::poc { |
147 | | - variable myConfigFile "../tb/common/my_config_GENERIC.vhdl" |
148 | | - variable myProjectFile "../tb/common/my_project.vhdl" |
149 | | - variable vendor "GENERIC"; # GENERIC for vendor-less build; Xilinx, Altera,... for vendor specific build |
150 | | - } |
151 | | -
|
152 | | - SetExtendedSimulateOptions {-frelaxed -Wno-specs -Wno-binding} |
153 | | -
|
154 | | - build ../../tb/RunAllTests.pro |
155 | | - EOF |
156 | | -
|
157 | | - printf "=================\n" |
158 | | - tclsh run.tcl |
159 | | -
|
160 | | - - name: 📤 Upload 'GHDL-PoC-Report' artifacts |
161 | | - uses: pyTooling/upload-artifact@v4 |
| 54 | + - name: 🗑️ Delete YAML artifacts from matrix jobs |
| 55 | + uses: geekyeggo/delete-artifact@v5 |
162 | 56 | continue-on-error: true |
163 | 57 | with: |
164 | | - name: GHDL-PoC-Report |
165 | | - working-directory: temp/ghdl |
166 | | - path: | |
167 | | - logs |
168 | | - reports |
169 | | - *.html |
170 | | - *.yml |
171 | | - retention-days: 1 |
| 58 | + name: | |
| 59 | + OSVVM-Report-YAML-* |
| 60 | + PoC-Report-YAML-* |
172 | 61 |
|
173 | | - - name: 📤 Upload 'GHDL-PoC-Report-XML' artifacts |
174 | | - uses: pyTooling/upload-artifact@v4 |
| 62 | + - name: 🗑️ Delete JUnit XML artifacts from matrix jobs |
| 63 | + uses: geekyeggo/delete-artifact@v5 |
175 | 64 | continue-on-error: true |
176 | 65 | with: |
177 | | - name: GHDL-PoC-Report-XML |
178 | | - working-directory: temp/ghdl |
179 | | - path: | |
180 | | - *.xml |
181 | | - retention-days: 1 |
182 | | - |
183 | | - - name: 📤 Upload 'GHDL-PoC' artifacts |
184 | | - uses: pyTooling/upload-artifact@v4 |
185 | | - with: |
186 | | - name: GHDL-PoC |
187 | | - working-directory: temp/ghdl |
188 | | - path: | |
189 | | - VHDL_LIBS |
190 | | - retention-days: 1 |
| 66 | + name: | |
| 67 | + OSVVM-Report-XML-* |
| 68 | + PoC-Report-XML-* |
191 | 69 |
|
192 | 70 | Documentation: |
193 | | - uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@r4 |
| 71 | + uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@r6 |
194 | 72 | needs: |
195 | | - - Build-PoC |
| 73 | + - PublishTestResults |
| 74 | +# if: success() || failure() |
196 | 75 | with: |
197 | 76 | requirements: '-r docs/requirements.txt' |
198 | 77 | doc_directory: 'docs' |
199 | | - unittest_xml_artifact: 'GHDL-PoC-Report-XML' |
| 78 | + unittest_xml_artifact: 'PoC-Report-XML' |
200 | 79 | html_artifact: 'PoC-HTML' |
201 | 80 | latex_artifact: 'PoC-LaTeX' |
202 | 81 |
|
| 82 | + Test: |
| 83 | + runs-on: 'ubuntu-24.04' |
| 84 | + needs: |
| 85 | + - Simulate |
| 86 | + - PublishTestResults |
| 87 | + - Documentation |
| 88 | +# if: success() || failure() |
| 89 | + steps: |
| 90 | + - run: | |
| 91 | + printf "Simulate: '%s'\n" "${{ needs.Simulate.result }}" |
| 92 | + printf "PublishTestResults: '%s'\n" "${{ needs.PublishTestResults.result }}" |
| 93 | + printf "Documentation: '%s'\n" "${{ needs.Documentation.result }}" |
| 94 | +
|
| 95 | + PDFDocumentation: |
| 96 | + uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@dev |
| 97 | + needs: |
| 98 | + - Documentation |
| 99 | + if: (success() || failure()) && needs.Documentation.result == 'success' |
| 100 | + with: |
| 101 | + document: 'The PoC-Library' |
| 102 | + latex_artifact: 'PoC-LaTeX' |
| 103 | + pdf_artifact: 'PoC-PDF' |
| 104 | + can-fail: 'true' |
| 105 | + |
203 | 106 | PublishToGitHubPages: |
204 | | - uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev |
| 107 | + uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r6 |
205 | 108 | needs: |
206 | 109 | - Documentation |
207 | | - - Build-PoC |
| 110 | + - Simulate |
| 111 | +# if: (success() || failure()) && needs.Documentation.result == 'success' |
208 | 112 | with: |
209 | 113 | doc: 'PoC-HTML' |
210 | 114 | # coverage: 'PoC-Coverage-HTML' |
211 | 115 |
|
| 116 | + AutoTag: |
| 117 | + uses: pyTooling/Actions/.github/workflows/TagReleaseCommit.yml@r6 |
| 118 | + needs: |
| 119 | + - Prepare |
| 120 | + - PublishToGitHubPages |
| 121 | + if: needs.Prepare.outputs.is_release_commit == 'true' && github.event_name != 'schedule' |
| 122 | + permissions: |
| 123 | + contents: write # required for create tag |
| 124 | + actions: write # required for trigger workflow |
| 125 | + with: |
| 126 | + version: ${{ needs.Prepare.output.version }} |
| 127 | + auto_tag: ${{ needs.Prepare.outputs.is_release_commit }} |
| 128 | + |
212 | 129 | Release: |
213 | | - uses: pyTooling/Actions/.github/workflows/NightlyRelease.yml@r4 |
214 | | - if: startsWith(github.ref, 'refs/tags/v') |
| 130 | + uses: pyTooling/Actions/.github/workflows/PublishReleaseNotes.yml@r6 |
215 | 131 | needs: |
216 | | -# - Ubuntu |
217 | | -# - Windows |
218 | | -# - PublishCoverageResults |
219 | | -# - PublishTestResults |
220 | 132 | - PublishToGitHubPages |
221 | | - secrets: inherit |
| 133 | + if: needs.Prepare.outputs.is_release_tag == 'true' |
222 | 134 | permissions: |
223 | 135 | contents: write |
224 | | - actions: write |
225 | | - attestations: write |
| 136 | + actions: write |
226 | 137 | with: |
227 | 138 | prerelease: true |
228 | 139 | replacements: | |
229 | | - poc=1.3.0 |
230 | | - nightly_name: "v1.3.0" |
231 | | - nightly_description: | |
| 140 | + poc=${{ needs.Prepare.outputs.version }} |
| 141 | + tag: ${{ needs.Prepare.outputs.version }} |
| 142 | + description: | |
232 | 143 | # The PoC-Library %poc% |
233 | 144 | inventory-json: "inventory.json" |
234 | | - inventory-version: "1.3.0" |
| 145 | + inventory-version: ${{ needs.Prepare.outputs.version }} |
235 | 146 | assets: | |
| 147 | +
|
| 148 | + secrets: inherit |
0 commit comments