-
Notifications
You must be signed in to change notification settings - Fork 13
61 lines (57 loc) · 1.9 KB
/
linux.yml
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
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