54 lines (54 loc) · 1.63 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
on: push
name: CI
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', pypy3]
- 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: |
apt install yices2
pip install setuptools setuptools_scm wheel coverage codecov yowasp-yosys nmigen-yosys
export NMIGEN_USE_YOSYS=builtin YOSYS=yowasp-yosys
- name: Preserve wasmtime cache
uses: actions/cache@v1
with:
path: ~/.local/wasmtime
key: ${{ runner.os }}-wasmtime
- name: Run tests
run: |
python -m unittest discover
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: |
python -m pip install --upgrade setuptools setuptools_scm wheel
pip install -r docs/requirements.txt
pip install -e .
- name: Build documentation
run: |
sphinx-build docs docs/_build
- name: Publish documentation
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/_build
TARGET_FOLDER: latest/