diff --git a/.copier-answers.yaml b/.copier-answers.yaml index 74d894a..ca35c18 100644 --- a/.copier-answers.yaml +++ b/.copier-answers.yaml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: f812aaa +_commit: 18afe0a _src_path: https://github.com/python-project-templates/base.git add_docs: false add_extension: python diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5d59cd5..e0faf55 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,71 +31,71 @@ jobs: cibuildwheel: - "cp311" steps: - - uses: actions/checkout@v5 - with: - submodules: 'true' - - - name: Setup cache (mac/linux) - uses: actions/cache@v4 - with: - path: "/home/runner/work/verilator-python/verilator-python/.ccache" - key: cache-${{ runner.os }}- - restore-keys: cache-${{ runner.os }}- - if: ${{ runner.os != 'Windows' }} - - - name: Setup cache (windows) - uses: actions/cache@v4 - with: - path: "C:/ProgramData/chocolatey/" - key: cache-${{ runner.os }}- - restore-keys: cache-${{ runner.os }}- - if: ${{ runner.os == 'Windows' }} - - - uses: actions-ext/python/setup@main - with: - version: ${{ matrix.python-version }} - - - name: Install dependencies - run: pip install cibuildwheel - - - name: Python Wheel Steps (linux) - run: python -m cibuildwheel --output-dir dist - env: - CIBW_BUILD: "${{ matrix.cibuildwheel }}-manylinux*" - CIBW_ENVIRONMENT_LINUX: CCACHE_DIR="/host/home/runner/work/verilator-python/verilator-python/.ccache" - CIBW_BUILD_VERBOSITY: 3 - if: ${{ runner.os == 'Linux' }} - - - name: Python Build Steps (mac) - run: python -m cibuildwheel --output-dir dist - env: - CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*" - CIBW_ENVIRONMENT_MACOS: CCACHE_DIR="/Users/runner/work/verilator-python/verilator-python/.ccache" MACOSX_DEPLOYMENT_TARGET=11.0 - CIBW_BUILD_VERBOSITY: 3 - if: ${{ matrix.os == 'macos-14' }} - - - name: Python Build Steps (windows) - run: python -m cibuildwheel --output-dir dist - env: - CIBW_BUILD: "${{ matrix.cibuildwheel }}-win_amd64" - if: ${{ matrix.os == 'windows-2022' }} - - - name: Upload Wheel - uses: actions/upload-artifact@v5 - with: - name: dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }} - path: dist/*.whl - - - name: Install wheel (mac/linux) - run: python -m pip install dist/*.whl - if: ${{ runner.os != 'Windows' }} - - - name: Install wheel (windows) - run: python -m pip install -U (Get-ChildItem .\dist\*.whl | Select-Object -Expand FullName) - if: ${{ runner.os == 'Windows' }} - - - name: Install test dependencies - run: python -m pip install pytest rich typer - - - name: Test Wheel - run: python -m pytest -vvv verilator/tests + - uses: actions/checkout@v5 + with: + submodules: 'true' + + - name: Setup cache (mac/linux) + uses: actions/cache@v4 + with: + path: "/home/runner/work/verilator-python/verilator-python/.ccache" + key: cache-${{ runner.os }}- + restore-keys: cache-${{ runner.os }}- + if: ${{ runner.os != 'Windows' }} + + - name: Setup cache (windows) + uses: actions/cache@v4 + with: + path: "C:/ProgramData/chocolatey/" + key: cache-${{ runner.os }}- + restore-keys: cache-${{ runner.os }}- + if: ${{ runner.os == 'Windows' }} + + - uses: actions-ext/python/setup@main + with: + version: ${{ matrix.python-version }} + + - name: Install dependencies + run: pip install cibuildwheel + + - name: Python Wheel Steps (linux) + run: python -m cibuildwheel --output-dir dist + env: + CIBW_BUILD: "${{ matrix.cibuildwheel }}-manylinux*" + CIBW_ENVIRONMENT_LINUX: CCACHE_DIR="/host/home/runner/work/verilator-python/verilator-python/.ccache" + CIBW_BUILD_VERBOSITY: 3 + if: ${{ runner.os == 'Linux' }} + + - name: Python Build Steps (mac) + run: python -m cibuildwheel --output-dir dist + env: + CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*" + CIBW_ENVIRONMENT_MACOS: CCACHE_DIR="/Users/runner/work/verilator-python/verilator-python/.ccache" MACOSX_DEPLOYMENT_TARGET=11.0 + CIBW_BUILD_VERBOSITY: 3 + if: ${{ matrix.os == 'macos-14' }} + + - name: Python Build Steps (windows) + run: python -m cibuildwheel --output-dir dist + env: + CIBW_BUILD: "${{ matrix.cibuildwheel }}-win_amd64" + if: ${{ matrix.os == 'windows-2022' }} + + - name: Upload Wheel + uses: actions/upload-artifact@v5 + with: + name: dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }} + path: dist/*.whl + + - name: Install wheel (mac/linux) + run: python -m pip install dist/*.whl + if: ${{ runner.os != 'Windows' }} + + - name: Install wheel (windows) + run: python -m pip install -U (Get-ChildItem .\dist\*.whl | Select-Object -Expand FullName) + if: ${{ runner.os == 'Windows' }} + + - name: Install test dependencies + run: python -m pip install pytest rich typer + + - name: Test Wheel + run: python -m pytest -vvv verilator/tests diff --git a/pyproject.toml b/pyproject.toml index d81d165..c038da2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,10 +38,11 @@ develop = [ "cibuildwheel", "codespell>=2.4,<2.5", "hatchling", - "mdformat>=0.7.22,<0.8", + "mdformat>=0.7.22,<1.1", "mdformat-tables>=1", "pytest", "pytest-cov", + "ruff>=0.9,<0.15", "twine", "uv", "wheel",