-
Notifications
You must be signed in to change notification settings - Fork 3
102 lines (78 loc) · 2.33 KB
/
pipeline.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Copyright (c) 2023-2024 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
name: Pipeline
on: [pull_request, push, workflow_dispatch]
jobs:
Tests:
runs-on: ubuntu-latest
name: "Test Python ${{ matrix.python-version }}"
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dev requirements
run: |
sudo apt-get update -qq
sudo apt-get install -y \
antlr4 \
libantlr4-runtime-dev \
python3-dev \
yosys
python3 -m pip install --upgrade pip wheel setuptools
python3 -m pip install nox
python3 -m pip install git+https://github.com/antmicro/tuttest
- name: Run lint checks
run: nox -s isort black flake8
- name: Build
run: tuttest README.md | bash -
- name: Run pytest with nox
run: nox -s tests
Examples:
runs-on: ubuntu-latest
name: 'Example ${{ matrix.example }}'
strategy:
fail-fast: false
matrix:
example:
- HDMI
- INOUT
- PWM
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install tuttest and fpga-topwrap
run: |
python3 -m pip install git+https://github.com/antmicro/tuttest
tuttest README.md | bash -
- name: Generate sources for example HDMI setup
if: matrix.example == 'HDMI'
run: |
cd examples/hdmi
tuttest README.md generate | bash -
cd -
- name: Generate sources for example inout setup
if: matrix.example == 'INOUT'
run: |
cd examples/inout
tuttest README.md generate | bash -
cd -
- name: Generate sources for and build example PWM setup
if: matrix.example == 'PWM'
run: |
cd examples/pwm
tuttest README.md generate | bash -
cd -
- uses: actions/upload-artifact@v3
if: matrix.example == 'PWM'
with:
name: top.bit
path: top.bit