Skip to content

Commit

Permalink
Use new GitHub Action for OSVVM workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Jul 21, 2024
1 parent 2a44839 commit ee2cebc
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build and test

on: [push, pull_request]
on: [pull_request]

jobs:
build-ubuntu:
Expand Down
78 changes: 46 additions & 32 deletions .github/workflows/test-osvvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,62 @@ jobs:
test-osvvm:
name: Test OSVVM
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: nickg/setup-nvc-ci@v1
with:
version: latest
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/checkout@v4
with:
repository: OSVVM/OsvvmLibraries
path: OsvvmLibraries
ref: dev
submodules: recursive
fetch-depth: 1
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: >-
base-devel
git
unzip
mingw-w64-x86_64-tcllib
- name: Download MSYS2 mingw64 package
id: download-artifact
uses: dawidd6/action-download-artifact@v3
with:
workflow: build-test.yml
workflow_conclusion: success
branch: master
name: MSYS2 mingw64 package
skip_unpack: false
if_no_artifact_found: fail
- name: Install NVC
run: |
pacman -U --noconfirm *.zst
# - name: Test OSVVM
# shell: powershell
# run: |
# $Env:OSVVM_DIR = $(Resolve-Path -Path OsvvmLibraries)
# echo $Env:OSVVM_DIR
# $Env:OSVVM_MUST_BUILD = 1
# nvc.exe --do .\test\test-osvvm.tcl
- name: Test OSVVM
shell: msys2 {0}
run: |
: # remove VHDL lib source from NVC repo (issue #557}
rm -rf lib/*
: # install OSVVM, run test, diff results with verified results
mkdir tmp && cd tmp
git clone --branch dev --recurse-submodules --depth=1 -j8 https://github.com/OSVVM/OsvvmLibraries.git
export PATH=/c/Program\ Files/NVC/bin:$PATH
export OSVVM_DIR=$(realpath OsvvmLibraries)
export OSVVM_MUST_BUILD=1
tclsh ../test/test-osvvm.tcl
failures=$(xmllint --xpath 'string(/testsuites/@failures)' OsvvmLibraries_RunAllTests.xml)
failuresVti=$(xmllint --xpath 'string(/testsuites/@failures)' OsvvmLibraries_RunAllTestsVti.xml)
if [ "$failures" != "0" ] || [ "$failuresVti" != "0" ]; then
echo "*** one or more tests failed ***"
exit 1
fi
tclsh ./test/test-osvvm.tcl
- name: Upload logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: osvvm-logs
path: |
*.log
*.yml
*.html
*.xml
reports/*.html
reports/**/*.html
logs/**/*.*
reports/*.css
reports/osvvm.png
if-no-files-found: error
- name: Publish results
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: OSVVM Regression Results
path: ./*.xml
reporter: java-junit
list-suites: all
list-tests: failed

0 comments on commit ee2cebc

Please sign in to comment.