-
Notifications
You must be signed in to change notification settings - Fork 7
100 lines (90 loc) · 2.4 KB
/
run.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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 cocotb-bus cocotb-test
- 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 }}