[util] fix deprecation warning for python 3.12 #167
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Test | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
# disable macos for now until I figure out how to build verilator | |
# os: [ ubuntu-latest, macos-latest ] | |
python-version: [ 3.7, 3.8, 3.9 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout submodules π₯οΈ | |
shell: bash | |
run: | | |
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | |
git submodule sync --recursive | |
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | |
- name: Setup Python environment π | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version π | |
run: python -c "import sys; print(sys.version)" | |
- name: Install Verilator π | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install verilator | |
- name: Install Verilator π | |
if: matrix.os == 'macOS-latest' | |
run: brew install verilator | |
- name: Install deps π οΈ | |
shell: bash | |
run: | | |
pip install -e .[test] | |
- name: Run tests βοΈ | |
shell: bash | |
run: | | |
pytest tests/ -v | |
- name: Build Python wheel π‘ | |
shell: bash | |
run: | | |
pip3 install wheel | |
python3 setup.py bdist_wheel | |
- name: Upload artifact π | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Python Wheel | |
path: dist/ | |
- name: Publish distribution π¦ to PyPI | |
if: startsWith(github.ref, 'refs/tags') && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: keyi | |
password: ${{ secrets.PYPI_PASSWORD }} | |
skip_existing: true |