CI: fix sri-csl/formal-methods PPA series.
[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', '3.9', 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 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA8E1301F4D3932C
24 sudo add-apt-repository 'deb http://ppa.launchpad.net/sri-csl/formal-methods/ubuntu bionic main'
25 sudo apt-get update
26 sudo apt-get install yices2
27 pip install setuptools setuptools_scm wheel coverage codecov yowasp-yosys nmigen-yosys
28 pip install -e .
29 - name: Preserve wasmtime cache
30 uses: actions/cache@v1
31 with:
32 path: ~/.cache/wasmtime
33 key: ${{ runner.os }}-wasmtime
34 - name: Run tests
35 run: |
36 export NMIGEN_USE_YOSYS=builtin YOSYS=yowasp-yosys SBY=yowasp-sby SMTBMC=yowasp-yosys-smtbmc
37 export PYTHONWARNINGS=error
38 python -m coverage run -m unittest
39 codecov
40 document:
41 runs-on: ubuntu-latest
42 steps:
43 - name: Check out source code
44 uses: actions/checkout@v2
45 with:
46 fetch-depth: 0
47 - name: Set up Python
48 uses: actions/setup-python@v2
49 - name: Install dependencies
50 run: |
51 python -m pip install --upgrade setuptools setuptools_scm wheel
52 pip install -r docs/requirements.txt
53 pip install -e .
54 - name: Build documentation
55 run: |
56 sphinx-build docs docs/_build
57 - name: Publish documentation
58 if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
59 uses: JamesIves/github-pages-deploy-action@releases/v3
60 with:
61 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62 BRANCH: gh-pages
63 FOLDER: docs/_build
64 TARGET_FOLDER: latest/