Skip to content

Update docs, library name, and add command support for getting share … #75

Update docs, library name, and add command support for getting share …

Update docs, library name, and add command support for getting share … #75

Workflow file for this run

name: CI
on:
- push
- pull_request
- workflow_dispatch
jobs:
linux-pretest:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Test build
run: |
python3 -m venv py
./py/bin/pip install ivpm pytest pytest-fv
./py/bin/python3 -m ivpm update -a
./packages/python/bin/python3 setup.py bdist_wheel
- name: Run tests
run: |
rm ivpm.yaml
export PATH=$(pwd)/packages/verilator/bin:${PATH}
export PATH=$(pwd)/packages/iverilog/bin:${PATH}
export PATH=$(pwd)/py/bin:${PATH}
./py/bin/pip install dist/*.whl
PYTEST_FV_HDLSIM=vlt ./py/bin/python3 -m pytest ./tests/unit
PYTEST_FV_HDLSIM=ivl ./py/bin/python3 -m pytest ./tests/unit
doc:
runs-on: ubuntu-latest
needs: linux-pretest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
run: |
git clone https://github.com/SeanOBoyle/DoxygenFilterSystemVerilog.git packages/doxygen-filter-sv
sudo apt-get install -y doxygen verilator
python3 -m pip install packaging sphinx cairosvg sphinx-argparse
python3 -m pip install sphinx-rtd-theme breathe
python3 -m pip install ivpm cxxheaderparser pcpp
- name: Build
run: |
python3 setup.py build_ext --inplace
cd doc
make html
touch build/html/.nojekyll
- name: Deploy
if: startsWith(github.ref, 'refs/heads/main')
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: doc/build/html # The folder the action should deploy.
linux:
runs-on: ubuntu-latest
needs: linux-pretest
strategy:
matrix:
include:
- spec: 'cp38-cp38'
- spec: 'cp39-cp39'
- spec: 'cp310-cp310'
- spec: 'cp311-cp311'
- spec: 'cp312-cp312'
steps:
- name: checkout
uses: actions/checkout@v4
- name: Build packages
env:
IVPM_PYTHON: /opt/python/${{ matrix.spec }}/bin/python
BUILD_NUM: ${{ github.run_id }}
run: >
docker run --rm
--volume "$(pwd):/io"
--env IVPM_PYTHON
--env BUILD_NUM
--workdir /io
quay.io/pypa/manylinux2014_x86_64
/io/scripts/build_linux.sh
- name: Publish to PyPi
if: startsWith(github.ref, 'refs/heads/main')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 -m pip install twine
python3 -m twine upload wheelhouse/*.whl
# macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
# - name: Fetch dependencies
# run: |
# python3 --version
# python3 -m pip install ivpm
# python3 -m ivpm update -a
# ./packages/python/bin/python3 -m pip install cython setuptools wheel build twine
# - name: Build wheel
# env:
# BUILD_NUM: ${{ github.run_id }}
# run: |
# echo "BUILD_NUM=${BUILD_NUM}" >> python/hdl_pi_if/__build_num__.py
# ./packages/python/bin/python3 setup.py bdist_wheel
# - name: Publish to PyPi
# if: startsWith(github.ref, 'refs/heads/main')
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
# run: |
# ./packages/python/bin/python3 -m twine upload dist/*.whl
# windows:
# runs-on: ${{ matrix.platform }}
# strategy:
# matrix:
# include:
# - platform: windows-latest
# build_arch: x64
# python_arch: x64
# spec: '3.8'
# - platform: windows-latest
# build_arch: x64
# python_arch: x64
# spec: '3.9'
# - platform: windows-latest
# build_arch: x64
# python_arch: x64
# spec: '3.10'
# - platform: windows-latest
# build_arch: x64
# python_arch: x64
# spec: '3.11'
# steps:
# - name: checkout
# uses: actions/checkout@v2
# - name: Install python ${{ matrix.spec }}
# uses: actions/setup-python@v2
# with:
# architecture: ${{ matrix.python_arch }}
# python-version: ${{ matrix.spec }}
# - uses: ilammy/[email protected]
# with:
# arch: ${{ matrix.build_arch }}
# - name: Build/Test Package
# env:
# BUILD_NUM: ${{ github.run_id }}
# run: |
# python -m pip install ivpm
# python -m ivpm update -a
# ./packages/python/Scripts/python -m pip install ninja cython setuptools wheel build twine
# echo "BUILD_NUM=$env:BUILD_NUM" > python/hdl_pi_if/__build_num__.py
# ./packages/python/Scripts/python setup.py build bdist_wheel
# ls dist
# - name: Publish to PyPi
# if: startsWith(github.ref, 'refs/heads/main')
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
# shell: bash
# run: |
# ./packages/python/Scripts/python -m twine upload dist/*.whl