Skip to content

Commit 351f8eb

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

File tree

2 files changed

+115
-36
lines changed

2 files changed

+115
-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: 113 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.action_ref }}"
18+
19+
branch=""
20+
tag="2025.xx"
21+
if [[ "${{ startsWith(github.action_ref, 'refs/heads/') }}" == "true" ]]; then
22+
branch="${ref:11}"
23+
elif [[ "${{ startsWith(github.action_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,64 @@ 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+
export PATH="/c/Program\ Files/NVC/bin:$PATH"
179+
180+
tclsh ../.github/test.tcl StartNVC.tcl
181+
159182
- name: '📤 Upload artifact: logs'
160183
uses: actions/upload-artifact@v4
161184
with:
@@ -230,6 +253,7 @@ jobs:
230253
uses: actions/checkout@v4
231254
with:
232255
path: OsvvmLibraries
256+
submodules: recursive
233257

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

0 commit comments

Comments
 (0)