CI: run testsuite with -Werror.
[nmigen.git] / .github / workflows / main.yaml
1 on:
2 push: {}
3 pull_request:
4 types: [opened, reopened, synchronize]
5 name: CI
6 jobs:
7 test:
8 runs-on: ubuntu-latest
9 strategy:
10 matrix:
11 python-version: ['3.6', '3.7', '3.8', pypy3]
12 steps:
13 - name: Check out source code
14 uses: actions/checkout@v2
15 with:
16 fetch-depth: 0
17 - name: Set up Python
18 uses: actions/setup-python@v2
19 with:
20 python-version: ${{ matrix.python-version }}
21 - name: Install dependencies
22 run: |
23 sudo add-apt-repository ppa:sri-csl/formal-methods
24 sudo apt-get update
25 sudo apt-get install yices2
26 pip install setuptools setuptools_scm wheel coverage codecov yowasp-yosys nmigen-yosys
27 pip install -e .
28 - name: Preserve wasmtime cache
29 uses: actions/cache@v1
30 with:
31 path: ~/.cache/wasmtime
32 key: ${{ runner.os }}-wasmtime
33 - name: Run tests
34 run: |
35 export NMIGEN_USE_YOSYS=builtin YOSYS=yowasp-yosys SBY=yowasp-sby SMTBMC=yowasp-yosys-smtbmc
36 export PYTHONWARNINGS=error
37 python -m coverage run -m unittest
38 codecov
39 document:
40 runs-on: ubuntu-latest
41 steps:
42 - name: Check out source code
43 uses: actions/checkout@v2
44 with:
45 fetch-depth: 0
46 - name: Set up Python
47 uses: actions/setup-python@v2
48 - name: Install dependencies
49 run: |
50 python -m pip install --upgrade setuptools setuptools_scm wheel
51 pip install -r docs/requirements.txt
52 pip install -e .
53 - name: Build documentation
54 run: |
55 sphinx-build docs docs/_build
56 - name: Publish documentation
57 if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
58 uses: JamesIves/github-pages-deploy-action@releases/v3
59 with:
60 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61 BRANCH: gh-pages
62 FOLDER: docs/_build
63 TARGET_FOLDER: latest/