Skip to content

ci: Add if: always() to artifacts #248

ci: Add if: always() to artifacts

ci: Add if: always() to artifacts #248

Workflow file for this run

name: uvm-python github Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
max-parallel: 3
matrix:
python-version: [3.11]
experimental: [false]
steps:
- uses: actions/checkout@v1
- name: Cache iverilog
uses: actions/cache@v4
env:
cache-name: cache-iverilog-new
with:
path: ./iverilog
key: ${{ runner.os }}-iverilog-v1${{ env.cache-name }}
- name: Cache verilator
uses: actions/cache@v4
env:
cache-name: cache-verilator-new
with:
path: ./verilator
key: ${{ runner.os }}-verilator-v2${{ env.cache-name }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -r ci/requirements.txt
sudo apt-get install -y -qq flex bison gperf libreadline-dev libc6-dev
sudo apt install -y --no-install-recommends make g++ perl python3 autoconf libfl2 libfl-dev
sudo apt install -y zlib1g zlib1g-dev
#sudo bash ci/install_ghdl.sh
- name: Install uvm-python package
run: |
python -m pip install --user .
- name: Lint with flake8
run: |
python -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 ./src --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# Icarus Verilog testing
- name: Test with make test and Icarus
run: |
sudo bash ci/install_iverilog.sh
export SIM=icarus
export PYTHONPATH=`pwd`
ln -s src/uvm uvm
make test
- name: Upload Icarus test results
uses: actions/upload-artifact@v4
if: always()
with:
name: Icarus Test results in XML
path: results_icarus.log
retention-days: 2
# Verilator testing
- name: Test with make test and Verilator
run: |
export VERILATOR_ROOT="$PWD/verilator"
export PATH="$VERILATOR_ROOT/bin:$PATH"
sudo bash ci/install_verilator.sh
export SIM=verilator
export PYTHONPATH=`pwd`
ln -s src/uvm uvm
#SIM=verilator make test
make test-unit > results_verilator.log
make test-simple >> results_verilator.log
- name: Upload Verilator test results
uses: actions/upload-artifact@v4
if: always()
with:
name: Verilator Test results in XML
path: results_verilator.log
retention-days: 2
#- name: Test with make test and ghdl
# run: |
# export SIM=ghdl
# export PYTHONPATH=`pwd`
# ln -s src/uvm uvm
# make test TOPLEVEL_LANG=vhdl