-
Notifications
You must be signed in to change notification settings - Fork 40
62 lines (57 loc) · 1.82 KB
/
tests.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
# Copyright cocotb contributors
# Licensed under the Revised BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-3-Clause
name: Tests
on:
pull_request:
branches:
- master
- 'stable/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
tests:
name: ${{ matrix.extra_name }}cocotb ${{matrix.cocotb-version }} | ${{ matrix.sim }} (${{ matrix.sim-version }}) | ${{ matrix.os }} | Python ${{ matrix.python-version }} ${{ matrix.may_fail && '| May Fail' || '' }}
runs-on: ${{ matrix.os }}
env:
SIM: ${{ matrix.sim }}
TOPLEVEL_LANG: ${{ matrix.lang }}
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.12"]
# NOTE: align with versions in noxfile.py:
cocotb-version: ["1.6.0", "1.9.0"]
include:
- sim: icarus
sim-version: apt
lang: verilog
os: ubuntu-20.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install cocotb requirements
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends g++ make
- name: Set up Icarus (apt)
if: matrix.sim == 'icarus' && matrix.sim-version == 'apt'
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get install --yes --no-install-recommends iverilog
- name: Install testing requirements
run: |
python -m pip install nox
- name: Run tests
env:
COCOTB_ANSI_OUTPUT: 1
continue-on-error: ${{ matrix.may_fail || false }}
run: |
nox --session "tests(cocotb='${{ matrix.cocotb-version }}')"