Skip to content

Commit

Permalink
Test setup-nvc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jan 15, 2025
1 parent 983b93e commit 62d5c5d
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/OsvvmRegression.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set ::osvvm::FailOnBuildErrors "false"
include ../OsvvmLibraries.pro
include ../RunAllTests.pro
include ../RunAllTestsVti.pro
# include ../RunAllTests.pro
# include ../RunAllTestsVti.pro
152 changes: 118 additions & 34 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@ on:
- cron: '0 15 * * *'

jobs:
Variables:
name: Compute pipeline variables
runs-on: ubuntu-24.04
steps:
- name: Compute variables
run: |
ref="${{ github.ref }}"
branch=""
tag="2025.xx"
if [[ "${{ startsWith(github.ref, 'refs/heads/') }}" == "true" ]]; then
branch="${ref:11}"
elif [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
tag="${ref:10}"
else
printf "::error title=%s::%s\n" "Variables" "Unsupported Git reference format: '${ref}'."
exit 1
fi
tee "${GITHUB_OUTPUT}" <<EOF
branch=${branch}
tag=${tag}
EOF
GHDL:
name: ${{ matrix.os.icon }}${{ matrix.os.name }} - GHDL ${{ matrix.backend }}
runs-on: ${{ matrix.os.image }}
Expand Down Expand Up @@ -97,65 +121,68 @@ jobs:
if-no-files-found: error

NVC:
name: 🪟Windows - NVC
runs-on: windows-2022
name: ${{ matrix.icon }}${{ matrix.name }} - NVC
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- {icon: "🐧", name: "Ubuntu", image: "ubuntu-24.04", shell: "bash"}
# - {icon: "🪟", name: "Windows", image: "windows-2022", shell: "powershell"} # No TCL environment available. The embedded TCL of NVC doesn't contain tcllib.
- {icon: "🪟🟨", name: "Windows", image: "windows-2022", shell: "msys2 {0}"}

defaults:
run:
shell: "msys2 {0}"
shell: ${{ matrix.shell }}

steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: 🟨 Setup MSYS2 for UCRT64
- name: ${{ matrix.icon }} Setup MSYS2 for UCRT64
if: matrix.name == 'Windows' && startsWith(matrix.shell, 'msys2')
uses: msys2/setup-msys2@v2
with:
msystem: ucrt64
update: true
install: git
pacboy: tcl:p tcllib:p

- name: 🐧🛠️ Install NVC
- name: 🐧🛠️ Install tcl and tcllib
if: matrix.name == 'Ubuntu'
run: |
# See https://github.com/nickg/nvc/releases
# and https://github.com/nickg/nvc/issues/1131
NVC_VERSION="1.15.0"
NVC_DATE="20250111"
NVC_HASH="ec21477e"
ANSI_LIGHT_RED=$'\x1b[91m'
ANSI_LIGHT_GREEN=$'\x1b[92m'
ANSI_LIGHT_BLUE="\e[94m"
ANSI_NOCOLOR=$'\x1b[0m'
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"
printf "::group::${ANSI_LIGHT_BLUE}%s${ANSI_NOCOLOR}\n" "Downloading asset from '${DOWNLOAD_URL}' ..."
curl -L "${DOWNLOAD_URL}" -o nvc.pkg.tar.zst
printf "::endgroup::\n"
printf "::group::${ANSI_LIGHT_BLUE}%s${ANSI_NOCOLOR}\n" "Installing 'nvc.pkg.tar.zst' file ..."
pacman -U --noconfirm nvc.pkg.tar.zst
printf "::endgroup::\n"

printf "Deleting '%s' ... " "nvc.pkg.tar.zst"
rm "nvc.pkg.tar.zst"
if [[ $? -eq 0 ]]; then
printf "%s\n" "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}"
else
printf "%s\n" "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}"
printf "::warning title=%s::%s\n" "setup-nvc" "Failed to remove 'nvc.pkg.tar.zst'."
fi
sudo apt-get update
sudo apt-get install -y --no-install-recommends tcl tcllib
- name: 🚧 Run tests'
- name: Install NVC
uses: nickg/setup-nvc-ci@v1
with:
version: latest

- name: 🚧 Run tests on Ubuntu
if: matrix.name == 'Ubuntu'
run: |
mkdir temp
cd temp
tclsh ../.github/test.tcl StartNVC.tcl
- name: 🚧 Run tests on Windows + MSYS2/UCRT64
if: matrix.name == 'Windows' && startsWith(matrix.shell, 'msys2')
run: |
mkdir temp
cd temp
ls /c/
ls "/c/Program\ Files"
tree "/c/Program\ Files/NVC"
export PATH="/c/Program\ Files/NVC/bin:$PATH"
tclsh ../.github/test.tcl StartNVC.tcl
- name: '📤 Upload artifact: logs'
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -230,6 +257,7 @@ jobs:
uses: actions/checkout@v4
with:
path: OsvvmLibraries
submodules: recursive

- name: List content of 'OsvvmLibraries' ...
run: |
Expand All @@ -241,4 +269,60 @@ jobs:
name: osvvm
path: |
OsvvmLibraries/*
include-hidden-files: true
if-no-files-found: error

Release:
uses: pyTooling/Actions/.github/workflows/NightlyRelease.yml@r4
needs:
- Variables
- Package
# if: github.ref == 'refs/tags/testing'
# if: startsWith(github.ref, 'refs/tags/v')
secrets: inherit
permissions:
contents: write
actions: write
attestations: write
with:
prerelease: true
replacements: |
osvvm=${{ needs.Variables.outputs.tag }}
nightly_name: testing
nightly_description: |
This release contains all important artifacts created by OSVVM's CI pipeline.
# OSVVM %osvvm%
All Git repositories and submodules have been packaged in a single zip file. This file contains the following
OSVVM components.
## Core Components
* [OSVVM Utility Library](https://github.com/OSVVM/OSVVM)
* [OSVVM Model Independent Transactions](https://github.com/OSVVM/OSVVM-Common)
## Verification Components
* [AXI4](https://github.com/OSVVM/AXI4)
* [CoSim](https://github.com/OSVVM/CoSim)
* [DpRam](https://github.com/OSVVM/DpRam)
* [Ethernet](https://github.com/OSVVM/Ethernet)
* [UART](https://github.com/OSVVM/UART)
## Third-Party Verification Components
* [SPI (by Guy Eschemann)](https://github.com/OSVVM/SPI_GuyEschemann)
* [VideoBus (by Louis Adriaens)](https://github.com/OSVVM/VideoBus_LouisAdriaens)
## Scripting
* [OSVVM Scripts](https://github.com/OSVVM/OSVVM-Scripts)
## Documentation
* [Documentation](https://github.com/OSVVM/Documentation)
inventory-json: "inventory.json"
inventory-version: ${{ needs.Variables.outputs.tag }}
inventory-categories: "kind"
assets: |
osvvm: !OsvvmLibraries-%osvvm%.zip: osvvm,zip: OsvvmLibraries - %osvvm% - all-in-one (ZIP)
osvvm: $OsvvmLibraries-%osvvm%.tar.gz: osvvm,tgz: OsvvmLibraries - %osvvm% - all-in-one (TAR/GZ)
osvvm: $OsvvmLibraries-%osvvm%.tar.zst: osvvm,tzst: OsvvmLibraries - %osvvm% - all-in-one (TAR/ZST)

0 comments on commit 62d5c5d

Please sign in to comment.