Skip to content

Commit c927e3f

Browse files
committed
Test setup-nvc.
1 parent 983b93e commit c927e3f

File tree

2 files changed

+120
-36
lines changed

2 files changed

+120
-36
lines changed

.github/OsvvmRegression.pro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set ::osvvm::FailOnBuildErrors "false"
22
include ../OsvvmLibraries.pro
3-
include ../RunAllTests.pro
4-
include ../RunAllTestsVti.pro
3+
# include ../RunAllTests.pro
4+
# include ../RunAllTestsVti.pro

.github/workflows/Pipeline.yml

Lines changed: 118 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,30 @@ on:
88
- cron: '0 15 * * *'
99

1010
jobs:
11+
Variables:
12+
name: Compute pipeline variables
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- name: Compute variables
16+
run: |
17+
ref="${{ github.ref }}"
18+
19+
branch=""
20+
tag="2025.xx"
21+
if [[ "${{ startsWith(github.ref, 'refs/heads/') }}" == "true" ]]; then
22+
branch="${ref:11}"
23+
elif [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
24+
tag="${ref:10}"
25+
else
26+
printf "::error title=%s::%s\n" "Variables" "Unsupported Git reference format: '${ref}'."
27+
exit 1
28+
fi
29+
30+
tee "${GITHUB_OUTPUT}" <<EOF
31+
branch=${branch}
32+
tag=${tag}
33+
EOF
34+
1135
GHDL:
1236
name: ${{ matrix.os.icon }}${{ matrix.os.name }} - GHDL ${{ matrix.backend }}
1337
runs-on: ${{ matrix.os.image }}
@@ -97,65 +121,68 @@ jobs:
97121
if-no-files-found: error
98122

99123
NVC:
100-
name: 🪟Windows - NVC
101-
runs-on: windows-2022
124+
name: ${{ matrix.icon }}${{ matrix.name }} - NVC
125+
runs-on: ${{ matrix.image }}
126+
strategy:
127+
fail-fast: false
128+
matrix:
129+
include:
130+
- {icon: "🐧", name: "Ubuntu", image: "ubuntu-24.04", shell: "bash"}
131+
# - {icon: "🪟", name: "Windows", image: "windows-2022", shell: "powershell"} # No TCL environment available. The embedded TCL of NVC doesn't contain tcllib.
132+
- {icon: "🪟🟨", name: "Windows", image: "windows-2022", shell: "msys2 {0}"}
102133

103134
defaults:
104135
run:
105-
shell: "msys2 {0}"
136+
shell: ${{ matrix.shell }}
106137

107138
steps:
108139
- name: ⏬ Checkout repository
109140
uses: actions/checkout@v4
110141
with:
111142
submodules: recursive
112143

113-
- name: 🟨 Setup MSYS2 for UCRT64
144+
- name: ${{ matrix.icon }} Setup MSYS2 for UCRT64
145+
if: matrix.name == 'Windows' && startsWith(matrix.shell, 'msys2')
114146
uses: msys2/setup-msys2@v2
115147
with:
116148
msystem: ucrt64
117149
update: true
118150
install: git
119151
pacboy: tcl:p tcllib:p
120152

121-
- name: 🐧🛠️ Install NVC
153+
- name: 🐧🛠️ Install tcl and tcllib
154+
if: matrix.name == 'Ubuntu'
122155
run: |
123-
# See https://github.com/nickg/nvc/releases
124-
# and https://github.com/nickg/nvc/issues/1131
125-
NVC_VERSION="1.15.0"
126-
NVC_DATE="20250111"
127-
NVC_HASH="ec21477e"
128-
129-
ANSI_LIGHT_RED=$'\x1b[91m'
130-
ANSI_LIGHT_GREEN=$'\x1b[92m'
131-
ANSI_LIGHT_BLUE="\e[94m"
132-
ANSI_NOCOLOR=$'\x1b[0m'
133-
134-
DOWNLOAD_URL="https://github.com/nickg/nvc/releases/download/r${NVC_VERSION}/mingw-w64-ucrt-x86_64-nvc-${NVC_VERSION}.git${NVC_DATE}.${NVC_HASH}-1-any.pkg.tar.zst"
135-
printf "::group::${ANSI_LIGHT_BLUE}%s${ANSI_NOCOLOR}\n" "Downloading asset from '${DOWNLOAD_URL}' ..."
136-
curl -L "${DOWNLOAD_URL}" -o nvc.pkg.tar.zst
137-
printf "::endgroup::\n"
138-
139-
printf "::group::${ANSI_LIGHT_BLUE}%s${ANSI_NOCOLOR}\n" "Installing 'nvc.pkg.tar.zst' file ..."
140-
pacman -U --noconfirm nvc.pkg.tar.zst
141-
printf "::endgroup::\n"
142-
143-
printf "Deleting '%s' ... " "nvc.pkg.tar.zst"
144-
rm "nvc.pkg.tar.zst"
145-
if [[ $? -eq 0 ]]; then
146-
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
147-
else
148-
printf "%s\n" "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}"
149-
printf "::warning title=%s::%s\n" "setup-nvc" "Failed to remove 'nvc.pkg.tar.zst'."
150-
fi
156+
sudo apt-get update
157+
sudo apt-get install -y --no-install-recommends tcl tcllib
151158
152-
- name: 🚧 Run tests'
159+
- name: Install NVC
160+
uses: nickg/setup-nvc-ci@v1
161+
with:
162+
version: latest
163+
164+
- name: 🚧 Run tests on Ubuntu
165+
if: matrix.name == 'Ubuntu'
153166
run: |
154167
mkdir temp
155168
cd temp
156169
157170
tclsh ../.github/test.tcl StartNVC.tcl
158171
172+
- name: 🚧 Run tests on Windows + MSYS2/UCRT64
173+
if: matrix.name == 'Windows' && startsWith(matrix.shell, 'msys2')
174+
run: |
175+
mkdir temp
176+
cd temp
177+
178+
ls /c/
179+
ls "/c/Program\ Files"
180+
tree "/c/Program\ Files/NVC"
181+
182+
export PATH="/c/Program\ Files/NVC/bin:$PATH"
183+
184+
tclsh ../.github/test.tcl StartNVC.tcl
185+
159186
- name: '📤 Upload artifact: logs'
160187
uses: actions/upload-artifact@v4
161188
with:
@@ -230,6 +257,7 @@ jobs:
230257
uses: actions/checkout@v4
231258
with:
232259
path: OsvvmLibraries
260+
submodules: recursive
233261

234262
- name: List content of 'OsvvmLibraries' ...
235263
run: |
@@ -241,4 +269,60 @@ jobs:
241269
name: osvvm
242270
path: |
243271
OsvvmLibraries/*
272+
include-hidden-files: true
244273
if-no-files-found: error
274+
275+
Release:
276+
uses: pyTooling/Actions/.github/workflows/NightlyRelease.yml@dev
277+
needs:
278+
- Variables
279+
- Package
280+
# if: github.ref == 'refs/tags/testing'
281+
# if: startsWith(github.ref, 'refs/tags/v')
282+
secrets: inherit
283+
permissions:
284+
contents: write
285+
actions: write
286+
attestations: write
287+
with:
288+
prerelease: true
289+
replacements: |
290+
osvvm=${{ needs.Variables.outputs.tag }}
291+
nightly_name: testing
292+
nightly_description: |
293+
This release contains all important artifacts created by OSVVM's CI pipeline.
294+
295+
# OSVVM %osvvm%
296+
297+
All Git repositories and submodules have been packaged in a single zip file. This file contains the following
298+
OSVVM components.
299+
300+
## Core Components
301+
* [OSVVM Utility Library](https://github.com/OSVVM/OSVVM)
302+
* [OSVVM Model Independent Transactions](https://github.com/OSVVM/OSVVM-Common)
303+
304+
## Verification Components
305+
* [AXI4](https://github.com/OSVVM/AXI4)
306+
* [CoSim](https://github.com/OSVVM/CoSim)
307+
* [DpRam](https://github.com/OSVVM/DpRam)
308+
* [Ethernet](https://github.com/OSVVM/Ethernet)
309+
* [UART](https://github.com/OSVVM/UART)
310+
311+
## Third-Party Verification Components
312+
* [SPI (by Guy Eschemann)](https://github.com/OSVVM/SPI_GuyEschemann)
313+
* [VideoBus (by Louis Adriaens)](https://github.com/OSVVM/VideoBus_LouisAdriaens)
314+
315+
## Scripting
316+
* [OSVVM Scripts](https://github.com/OSVVM/OSVVM-Scripts)
317+
318+
## Documentation
319+
320+
* [Documentation](https://github.com/OSVVM/Documentation)
321+
322+
inventory-json: "inventory.json"
323+
inventory-version: ${{ needs.Variables.outputs.tag }}
324+
inventory-categories: "kind"
325+
assets: |
326+
osvvm: !OsvvmLibraries-%osvvm%.zip: osvvm,zip: OsvvmLibraries - %osvvm% - all-in-one (ZIP)
327+
osvvm: $OsvvmLibraries-%osvvm%.tar.gz: osvvm,tgz: OsvvmLibraries - %osvvm% - all-in-one (TAR/GZ)
328+
osvvm: $OsvvmLibraries-%osvvm%.tar.zst: osvvm,tzst: OsvvmLibraries - %osvvm% - all-in-one (TAR/ZST)

0 commit comments

Comments
 (0)