-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (78 loc) · 2.69 KB
/
main.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
on:
push: {}
pull_request:
types: [opened, reopened, synchronize]
name: CI
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', pypy3]
steps:
- name: Check out source code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA8E1301F4D3932C
sudo add-apt-repository 'deb http://ppa.launchpad.net/sri-csl/formal-methods/ubuntu bionic main'
sudo apt-get update
sudo apt-get install yices2
pip install coverage codecov yowasp-yosys
pip install -e .[builtin-yosys]
- name: Preserve Wasm cache
uses: actions/cache@v1
with:
path: |
~/.cache/wasmtime
~/.cache/yowasp
key: ${{ runner.os }}-wasm
- name: Run tests
run: |
export NMIGEN_USE_YOSYS=builtin YOSYS=yowasp-yosys SBY=yowasp-sby SMTBMC=yowasp-yosys-smtbmc
export PYTHONWARNINGS=error
python -m coverage run -m unittest discover -t . -s tests
codecov
document:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
- name: Install dependencies
run: |
pip install -r docs/requirements.txt
pip install -e .
- name: Build documentation
run: |
sphinx-build docs docs/_build
- name: Publish development documentation
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
repository-name: nmigen/nmigen.github.io
ssh-key: ${{ secrets.PAGES_DEPLOY_KEY }}
branch: main
folder: docs/_build
target-folder: docs/nmigen/latest/
- name: Extract release version
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
run: echo "VERSION=$(python setup.py --version)" >>$GITHUB_ENV
- name: Publish release documentation
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
repository-name: nmigen/nmigen.github.io
ssh-key: ${{ secrets.PAGES_DEPLOY_KEY }}
branch: main
folder: docs/_build
target-folder: docs/nmigen/v${{ env.VERSION }}/