Reworked GitHub Workflow #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: OSVVM Regression Testing | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 15 * * *' | |
jobs: | |
Variables: | |
name: Compute pipeline variables | |
runs-on: ubuntu-24.04 | |
outputs: | |
branch: ${{ steps.Variables.outputs.branch }} | |
tag: ${{ steps.Variables.outputs.tag }} | |
steps: | |
- name: Compute variables | |
id: 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 }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- {icon: "🐧", name: "Ubuntu", image: "ubuntu-24.04", shell: "bash", runtime: ""} | |
- {icon: "🍏", name: "macOS", image: "macos-14", shell: "bash", runtime: ""} | |
- {icon: "🪟🟨", name: "Windows", image: "windows-2022", shell: "msys2 {0}", runtime: "ucrt64"} | |
backend: | |
- mcode | |
- llvm | |
exclude: | |
- {os: {name: "macOS"}, backend: "mcode"} | |
defaults: | |
run: | |
shell: ${{ matrix.os.shell }} | |
steps: | |
- name: ⏬ Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: ${{ matrix.os.icon }} Setup MSYS2 for ${{ matrix.os.runtime }} | |
if: runner.os == 'Windows' && matrix.os.runtime != '' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.os.runtime }} | |
update: true | |
install: git | |
pacboy: tcl:p tcllib:p | |
- name: ⚙️ Setup GHDL | |
uses: ghdl/setup-ghdl@v1 | |
with: | |
version: nightly | |
runtime: ${{ matrix.os.runtime }} | |
backend: ${{ matrix.backend }} | |
- name: 🐧🛠️ Install tcl and tcllib | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends tcl tcllib | |
- name: 🚧 Run tests' | |
run: | | |
mkdir temp | |
cd temp | |
tclsh ../.github/test.tcl StartGHDL.tcl | |
- name: '📤 Upload artifact: logs' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: log-${{ matrix.os.name }}-ghdl-${{ matrix.backend }} | |
include-hidden-files: true | |
path: | | |
temp/*.log | |
temp/*.html | |
temp/reports/*.html | |
temp/reports/**/*.html | |
temp/logs/**/*.* | |
temp/reports/*.css | |
temp/reports/osvvm.png | |
if-no-files-found: error | |
retention-days: 1 | |
- name: '📤 Upload artifact: yaml' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: yaml-${{ matrix.os.name }}-ghdl-${{ matrix.backend }} | |
include-hidden-files: true | |
path: | | |
temp/*.yml | |
if-no-files-found: error | |
retention-days: 1 | |
- name: '📤 Upload artifact: xml' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: xml-${{ matrix.os.name }}-ghdl-${{ matrix.backend }} | |
include-hidden-files: true | |
path: | | |
temp/*.xml | |
if-no-files-found: error | |
retention-days: 1 | |
NVC: | |
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: ${{ matrix.shell }} | |
steps: | |
- name: ⏬ Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- 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 tree | |
pacboy: tcl:p tcllib:p | |
- name: 🐧🛠️ Install tcl and tcllib | |
if: matrix.name == 'Ubuntu' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends tcl tcllib | |
- 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 | |
tree "/c/Program Files/NVC" | |
export PATH="/c/Program Files/NVC/bin:$PATH" | |
which nvc | |
tclsh ../.github/test.tcl StartNVC.tcl | |
- name: '📤 Upload artifact: logs' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: log-${{ matrix.os.name }}-nvc-${{ matrix.backend }} | |
include-hidden-files: true | |
path: | | |
temp/*.log | |
temp/*.html | |
temp/reports/*.html | |
temp/reports/**/*.html | |
temp/logs/**/*.* | |
temp/reports/*.css | |
temp/reports/osvvm.png | |
if-no-files-found: error | |
retention-days: 1 | |
- name: '📤 Upload artifact: yaml' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: yaml-${{ matrix.os.name }}-nvc-${{ matrix.backend }} | |
include-hidden-files: true | |
path: | | |
temp/*.yml | |
if-no-files-found: error | |
retention-days: 1 | |
- name: '📤 Upload artifact: xml' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: xml-${{ matrix.os.name }}-nvc-${{ matrix.backend }} | |
include-hidden-files: true | |
path: | | |
temp/*.xml | |
if-no-files-found: error | |
retention-days: 1 | |
PublishTestResults: | |
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r4 | |
needs: | |
- GHDL | |
- NVC | |
with: | |
unittest_artifacts_pattern: 'xml-*' | |
merged_junit_artifact: 'xml' | |
additional_merge_args: '-d "--render=tree" "--name=OSVVM Regression" "--pytest=rewrite-dunder-init;reduce-depth:pytest.testsuite.pyunit;split:pytest"' | |
publish: ${{ github.event_name != 'pull_request' }} | |
Package: | |
name: Package OSVVMLibraries incl. all Git submodules as artifact | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: ⏬ Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: OsvvmLibraries | |
submodules: recursive | |
- name: List content of 'OsvvmLibraries' ... | |
run: | | |
tree OsvvmLibraries | |
- name: '📤 Upload artifact: osvvm' | |
uses: pyTooling/upload-artifact@v4 | |
with: | |
name: osvvm | |
working-directory: OsvvmLibraries | |
path: | | |
* | |
include-hidden-files: true | |
if-no-files-found: error | |
retention-days: 1 | |
Release: | |
uses: pyTooling/Actions/.github/workflows/NightlyRelease.yml@dev | |
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) |