File: main.yml

package info (click to toggle)
pyuvm 4.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 992 kB
  • sloc: python: 8,662; makefile: 238; vhdl: 206; sh: 7
file content (113 lines) | stat: -rw-r--r-- 3,407 bytes parent folder | download
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
103
104
105
106
107
108
109
110
111
112
113
name: Regression Tests

on:
  push:
    branches:
    - master
    - ral_dev
  pull_request:
    branches:
    - master
    - ral_dev
  workflow_dispatch:

jobs:

  tests:
    name: Python ${{matrix.python-version}} | cocotb ${{matrix.cocotb-version}}
    runs-on: ubuntu-24.04

    strategy:
      fail-fast: false
      matrix:
        include:
          # Test all Python versions with latest cocotb
          - python-version: "3.6"  # Disabled until we can move away from GHDL for this test
            cocotb-version: "1.9"
            vhdl-sim: "nvc"
          - python-version: "3.7"
            cocotb-version: "2.0"
            vhdl-sim: "nvc"
          - python-version: "3.8"
            cocotb-version: "2.0"
            vhdl-sim: "nvc"
          - python-version: "3.9"
            cocotb-version: "2.0"
            vhdl-sim: "nvc"
          - python-version: "3.10"
            cocotb-version: "2.0"
            vhdl-sim: "nvc"
          - python-version: "3.11"
            cocotb-version: "2.0"
            vhdl-sim: "nvc"
          - python-version: "3.12"
            cocotb-version: "2.0"
            vhdl-sim: "nvc"
          - python-version: "3.13"
            cocotb-version: "2.0"
            vhdl-sim: "nvc"
          # Test other cocotb versions
          # Must use GHDL as VHDL simulator as NVC is only supported in cocotb 1.9+
          - python-version: "3.8"
            cocotb-version: "1.6"
            vhdl-sim: "ghdl"
          - python-version: "3.8"
            cocotb-version: "1.7"
            vhdl-sim: "ghdl"
          - python-version: "3.8"
            cocotb-version: "1.8"
            vhdl-sim: "ghdl"
          - python-version: "3.8"
            cocotb-version: "1.9"
            vhdl-sim: "nvc"

    steps:
    - uses: actions/checkout@v5
    - name: Set up Python ${{matrix.python-version}} (setup-python)
      if: matrix.python-version != 3.6 && matrix.python-version != 3.7
      uses: actions/setup-python@v6
      with:
        python-version: ${{matrix.python-version}}
    - name: Set up Python ${{matrix.python-version}} (pyenv pt.1)
      if: matrix.python-version == 3.6 || matrix.python-version == 3.7
      uses: gabrielfalcao/pyenv-action@a1fc55906be92612782934c70e3985b940bd0165  # v18
      with:
        default: ${{matrix.python-version}}
        command: pip install -U pip  # upgrade pip after installing python
    - name: Set up Python ${{matrix.python-version}} (pyenv pt.2)
      if: matrix.python-version == 3.6 || matrix.python-version == 3.7
      run: |
        pyenv install ${{matrix.python-version}}
        pyenv global ${{matrix.python-version}}

    - name: Install Python testing dependencies
      run: |
        pip install tox tox-gh-actions

    - name: Install Icarus Verilog
      run: |
        sudo apt install -y --no-install-recommends iverilog

    - name: Install GHDL
      if: matrix.vhdl-sim == 'ghdl'
      uses: ghdl/setup-ghdl@v1
      with:
        version: latest
        backend: mcode

    - name: Install NVC
      if: matrix.vhdl-sim == 'nvc'
      uses: nickg/setup-nvc@v1
      with:
        version: latest

    - name: Test
      run: |
        COCOTB_VERSION=${{matrix.cocotb-version}} \
        VERILOG_SIM=icarus \
        VHDL_SIM=${{matrix.vhdl-sim}} \
        tox

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ !contains(github.ref, 'master') }}