mirror of
https://github.com/myhdl/myhdl.git
synced 2025-01-24 21:52:56 +08:00
f8022d3dbd
* Clean up verify convert warnings * Rewrote test and remove Xfail, test is passing now (is it supposed to fail?) * Rewrote test and remove Xfail, test is passing now (is it supposed to fail?) * Fixed all tests to handle the analyze/verify deprecation * Fixed to catch the correct error, List of signals as a port is not supported * Add a way to search for and add myhdl.vpi * Add explict test to check for deprecation case * Change warning from UserWarning (which is the default) to DeprecationWarning * Change test operation from script to makefile * No longer use travis * Add some ANSI colored logging * Fixed test to look for DeprecationWarning * Add lining step * Add linting step * Add linting step * Remove matrix step * Add work/ to clean list * Hide echo commands in window * The word test is reserved in pytest only for tests, doen't use it for any thing else, like blocks * Add myhdl.vpi to clean * Mark these tests as xfail, for now, * Fix and unmark xfail 2 tests * Add black support * Remove python2 only testing * Need to relook at this test, it performs differently for verilog and vhdl * Add RTL files to the list * Need to relook at this test, it performs differently for verilog and vhdl * Upgrade to DeprecationWarnings * Initial checkin with passing flow for new convert VHDL/Verilog, there are a few xfail tests that need to be debugged * Add more examples for the Deprecation cases, toVHDL and toVerilog * Fix deprecations catching * Fix pytest to use pytest.ini * Add pypi release steps * Fix intbv error * Fix indent * Update to do a release * Add checkout to step * Update Python versions * Add dependancy on tag on push
95 lines
2.9 KiB
YAML
95 lines
2.9 KiB
YAML
name: Test myhdl
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
schedule:
|
|
- cron: '0 1 * * 0'
|
|
jobs:
|
|
run_lint:
|
|
strategy:
|
|
fail-fast: false # So that one fail doesn't stop remaining tests
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install --upgrade -r requirements.txt
|
|
- name: Run lint
|
|
continue-on-error: true
|
|
run: |
|
|
pyflakes myhdl
|
|
|
|
build_ghdl:
|
|
#uses: daxzio/setup-eda/.github/workflows/setup_ghdl.yml@main
|
|
uses: ./.github/workflows/setup_ghdl.yml
|
|
build_iverilog:
|
|
#uses: daxzio/setup-eda/.github/workflows/setup_iverilog.yml@main
|
|
uses: ./.github/workflows/setup_iverilog.yml
|
|
|
|
build_code:
|
|
|
|
strategy:
|
|
fail-fast: false # So that one fail doesn't stop remaining tests
|
|
matrix:
|
|
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.9", "3.11"]
|
|
os: [ubuntu-latest]
|
|
target: [core, iverilog, ghdl]
|
|
runs-on: ${{ matrix.os }}
|
|
needs: [run_lint, build_ghdl, build_iverilog]
|
|
|
|
env:
|
|
CI_TARGET: ${{ matrix.target }}
|
|
TERM: xterm-256color # for tput in the script file
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Cache GHDL
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ needs.build_ghdl.outputs.cache_dir }}
|
|
key: ${{ needs.build_ghdl.outputs.cache_key }}
|
|
- name: Cache Icarus
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ needs.build_iverilog.outputs.cache_dir }}
|
|
key: ${{ needs.build_iverilog.outputs.cache_key }}
|
|
- name: Add to PATH
|
|
run: |
|
|
echo "${{ needs.build_ghdl.outputs.cache_dir }}/bin" >> $GITHUB_PATH
|
|
echo "${{ needs.build_iverilog.outputs.cache_dir }}/bin" >> $GITHUB_PATH
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install --upgrade -r requirements.txt
|
|
python -m pip install .
|
|
- name: Report Environment
|
|
run: |
|
|
echo "Runing tests with env set to : ${CI_TARGET}"
|
|
- name: Install depenacy for ghdl
|
|
if: ${{ env.CI_TARGET == 'ghdl' }}
|
|
run: |
|
|
sudo apt install gnat
|
|
- name: Run Tests
|
|
run: |
|
|
make ${CI_TARGET}
|
|
|
|
pypy_release:
|
|
runs-on: ubuntu-latest
|
|
needs: [build_code]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Make PyPi dist release
|
|
run: make release
|
|
- name: Publish Python distribution to PyPI
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|