-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Anderson Ignacio da Silva <[email protected]>
- Loading branch information
Showing
5 changed files
with
112 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
max-line-length = 80 | ||
select = C,E,F,W,B,B950 | ||
extend-ignore = E203, E501, E704, F401, W503 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: Lint > Tests > Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'stable/**' | ||
pull_request: | ||
branches: | ||
- master | ||
- 'stable/**' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
matrix: | ||
python-version: | ||
- 3.9 | ||
- '3.10' | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install nox | ||
run: pip install --upgrade nox | ||
|
||
- name: Run nox tests | ||
run: nox -s "lint-${{ matrix.python-version }}" | ||
|
||
tests: | ||
runs-on: ubuntu-22.04 | ||
needs: lint | ||
if: | | ||
always() && | ||
(needs.lint.result == 'success') | ||
strategy: | ||
matrix: | ||
python-version: | ||
- 3.7 | ||
- 3.8 | ||
- 3.9 | ||
- '3.10' | ||
- '3.11' | ||
- '3.12' | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Install Icarus and its requirements | ||
run: | | ||
sudo apt update | ||
sudo apt-get install build-essential libboost-dev iverilog verilator | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install nox | ||
run: pip install --upgrade nox | ||
|
||
- name: Run nox tests | ||
run: nox -s "run-${{ matrix.python-version }}" | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
build-n-publish: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI | ||
runs-on: ubuntu-latest | ||
needs: tests | ||
if: | | ||
always() && | ||
(needs.tests.result == 'success') | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
- name: Install deps | ||
run: >- | ||
pip install cocotb wavedrom | ||
- name: Install pypa/setuptools | ||
run: >- | ||
python -m | ||
pip install wheel | ||
- name: Build a binary wheel | ||
run: >- | ||
python setup.py sdist bdist_wheel | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1.9 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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
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
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