We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
NVC: Remove experimental status
After the current pending PRs we can move the next release of NVC out of the experimental CI group and update the docs.
- [x] #3553 / #3559
- [x] #3554 
- [x] NVC release (https://github.com/nickg/nvc/releases/tag/r1.11.0)
- [x] Update docs #3566


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `.github/generate-envs.py`
Content:
```
1 #!/usr/bin/env python3
2 # Copyright cocotb contributors
3 # Licensed under the Revised BSD License, see LICENSE for details.
4 # SPDX-License-Identifier: BSD-3-Clause
5 
6 """Get a list test environments."""
7 
8 import argparse
9 import json
10 import sys
11 
12 ENVS = [
13     # Test different Python versions with package managed Icarus on Ubuntu
14     {
15         "lang": "verilog",
16         "sim": "icarus",
17         "sim-version": "apt",
18         # lowest version according to https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
19         "os": "ubuntu-20.04",
20         "python-version": "3.6.7",
21         "group": "ci",
22     },
23     {
24         "lang": "verilog",
25         "sim": "icarus",
26         "sim-version": "apt",
27         # lowest version according to https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
28         "os": "ubuntu-20.04",
29         "python-version": "3.7.1",
30         "group": "ci",
31     },
32     {
33         "lang": "verilog",
34         "sim": "icarus",
35         "sim-version": "apt",
36         "os": "ubuntu-20.04",
37         "python-version": "3.8",
38         "group": "ci",
39     },
40     {
41         "lang": "verilog",
42         "sim": "icarus",
43         "sim-version": "apt",
44         "os": "ubuntu-20.04",
45         "python-version": "3.9",
46         "group": "ci",
47     },
48     {
49         "lang": "verilog",
50         "sim": "icarus",
51         "sim-version": "apt",
52         "os": "ubuntu-20.04",
53         "python-version": "3.10",
54         "group": "ci",
55     },
56     {
57         "lang": "verilog",
58         "sim": "icarus",
59         "sim-version": "apt",
60         "os": "ubuntu-20.04",
61         "python-version": "3.11",
62         "group": "ci",
63     },
64     {
65         "lang": "verilog",
66         "sim": "icarus",
67         "sim-version": "apt",
68         "os": "ubuntu-20.04",
69         "python-version": "3.12",
70         "group": "ci",
71     },
72     # A single test for the upcoming Python version.
73     {
74         "lang": "verilog",
75         "sim": "icarus",
76         "sim-version": "apt",
77         "os": "ubuntu-20.04",
78         "python-version": "3.13.0-alpha - 3.13.0",
79         "group": "experimental",
80     },
81     # Test Icarus on Ubuntu
82     {
83         "lang": "verilog",
84         "sim": "icarus",
85         "sim-version": "master",
86         "os": "ubuntu-20.04",
87         "python-version": "3.8",
88         "group": "experimental",
89     },
90     {
91         "lang": "verilog",
92         "sim": "icarus",
93         "sim-version": "v12_0",  # The latest release version.
94         "os": "ubuntu-20.04",
95         "python-version": "3.8",
96         "group": "experimental",
97     },
98     # Test GHDL on Ubuntu
99     {
100         "lang": "vhdl",
101         "sim": "ghdl",
102         "sim-version": "v2.0.0",  # GHDL 2.0 is the minimum supported version.
103         "os": "ubuntu-latest",
104         "python-version": "3.8",
105         "group": "ci",
106     },
107     {
108         "lang": "vhdl",
109         "sim": "ghdl",
110         "sim-version": "master",
111         "os": "ubuntu-latest",
112         "python-version": "3.8",
113         "group": "experimental",
114     },
115     # Test NVC on Ubuntu
116     {
117         "lang": "vhdl",
118         "sim": "nvc",
119         "sim-version": "master",  # Only master supported for now
120         "os": "ubuntu-latest",
121         "python-version": "3.8",
122         "group": "experimental",
123     },
124     # Test Verilator on Ubuntu
125     {
126         "lang": "verilog",
127         "sim": "verilator",
128         "sim-version": "v4.106",
129         "os": "ubuntu-20.04",
130         "python-version": "3.8",
131         # Various cocotb tests are known to fail with Verilator 4.106.
132         # Newer versions of Verilator are not working at all.
133         # See also https://github.com/cocotb/cocotb/issues/2300
134         "group": "experimental",
135     },
136     {
137         "lang": "verilog",
138         "sim": "verilator",
139         "sim-version": "master",
140         "os": "ubuntu-20.04",
141         "python-version": "3.8",
142         # Tests are currently not expected to work at all.
143         # See also https://github.com/cocotb/cocotb/issues/2300
144         "group": "experimental",
145     },
146     # Test other OSes
147     # Icarus homebrew
148     {
149         "lang": "verilog",
150         "sim": "icarus",
151         "sim-version": "homebrew-stable",
152         "os": "macos-11",
153         "python-version": "3.8",
154         "group": "ci",
155     },
156     # Icarus homebrew (HEAD/master)
157     {
158         "lang": "verilog",
159         "sim": "icarus",
160         "sim-version": "homebrew-HEAD",
161         "os": "macos-11",
162         "python-version": "3.8",
163         "group": "experimental",
164     },
165     # Icarus windows from source
166     {
167         "lang": "verilog",
168         "sim": "icarus",
169         "sim-version": "v12_0",
170         "os": "windows-latest",
171         "python-version": "3.8",
172         "toolchain": "mingw",
173         "extra_name": "mingw | ",
174         # mingw tests fail silently currently due to test harness limitations.
175         "group": "experimental",
176     },
177     # use msvc instead of mingw
178     {
179         "lang": "verilog",
180         "sim": "icarus",
181         "sim-version": "v12_0",
182         "os": "windows-latest",
183         "python-version": "3.11",
184         "toolchain": "msvc",
185         "extra_name": "msvc | ",
186         "group": "ci",
187     },
188     # Other
189     # use clang instead of gcc
190     {
191         "lang": "verilog",
192         "sim": "icarus",
193         "sim-version": "v12_0",
194         "os": "ubuntu-20.04",
195         "python-version": "3.8",
196         "cxx": "clang++",
197         "cc": "clang",
198         "extra_name": "clang | ",
199         "group": "ci",
200     },
201     # Test Siemens Questa on Ubuntu
202     {
203         "lang": "verilog",
204         "sim": "questa",
205         "sim-version": "siemens/questa/2023.2",
206         "os": "ubuntu-20.04",
207         "self-hosted": True,
208         "python-version": "3.8",
209         "group": "ci",
210     },
211     {
212         "lang": "vhdl and fli",
213         "sim": "questa",
214         "sim-version": "siemens/questa/2023.2",
215         "os": "ubuntu-20.04",
216         "self-hosted": True,
217         "python-version": "3.8",
218         "group": "ci",
219     },
220     {
221         "lang": "vhdl and vhpi",
222         "sim": "questa",
223         "sim-version": "siemens/questa/2023.2",
224         "os": "ubuntu-20.04",
225         "self-hosted": True,
226         "python-version": "3.8",
227         "group": "ci",
228     },
229     # Test Aldec Riviera-PRO on Ubuntu
230     {
231         "lang": "verilog",
232         "sim": "riviera",
233         "sim-version": "aldec/rivierapro/2022.04",
234         "os": "ubuntu-20.04",
235         "self-hosted": True,
236         "python-version": "3.8",
237         "group": "ci",
238     },
239     {
240         "lang": "vhdl",
241         "sim": "riviera",
242         "sim-version": "aldec/rivierapro/2022.04",
243         "os": "ubuntu-20.04",
244         "self-hosted": True,
245         "python-version": "3.8",
246         "group": "ci",
247     },
248     # Test Cadence Xcelium on Ubuntu
249     {
250         "lang": "verilog",
251         "sim": "xcelium",
252         "sim-version": "cadence/xcelium/2303",
253         "os": "ubuntu-20.04",
254         "self-hosted": True,
255         "python-version": "3.8",
256         "group": "ci",
257     },
258     # Xcelium VHDL (VHPI) is not yet supported.
259     # {
260     #     "lang": "vhdl",
261     #     "sim": "xcelium",
262     #     "sim-version": "cadence/xcelium/2303",
263     #     "os": "ubuntu-20.04",
264     #     "self-hosted": True,
265     #     "python-version": "3.8",
266     #     "group": "ci",
267     # },
268 ]
269 
270 
271 def main() -> int:
272     parser = argparse.ArgumentParser(description=__doc__)
273     parser.add_argument("--group")
274     parser.add_argument("--output-format", choices=("gha", "json"), default="json")
275     parser.add_argument(
276         "--gha-output-file",
277         type=argparse.FileType("a", encoding="utf-8"),
278         help="The $GITHUB_OUTPUT file.",
279     )
280 
281     args = parser.parse_args()
282 
283     if args.group is not None and args.group != "":
284         selected_envs = [t for t in ENVS if "group" in t and t["group"] == args.group]
285     else:
286         # Return all tasks if no group is selected.
287         selected_envs = ENVS
288 
289     # The "runs-on" job attribute is a string if we're using the GitHub-provided
290     # hosted runners, or an array with special keys if we're using self-hosted
291     # runners.
292     for env in selected_envs:
293         if "self-hosted" in env and env["self-hosted"] and "runs-on" not in env:
294             env["runs-on"] = ["self-hosted", "cocotb-private", env["os"]]
295         else:
296             env["runs-on"] = env["os"]
297 
298     if args.output_format == "gha":
299         # Output for GitHub Actions (GHA). Appends the configuration to
300         # the file named in the "--gha-output-file" argument.
301 
302         assert args.gha_output_file is not None
303 
304         # The generated JSON output may not contain newlines to be parsed by GHA
305         print(f"envs={json.dumps(selected_envs)}", file=args.gha_output_file)
306 
307         # Print the the selected environments for easier debugging.
308         print("Generated the following test configurations:")
309         print(json.dumps(selected_envs, indent=2))
310     elif args.output_format == "json":
311         print(json.dumps(selected_envs, indent=2))
312     else:
313         assert False
314 
315     return 0
316 
317 
318 if __name__ == "__main__":
319     sys.exit(main())
320
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/.github/generate-envs.py b/.github/generate-envs.py
--- a/.github/generate-envs.py
+++ b/.github/generate-envs.py
@@ -116,10 +116,10 @@
     {
         "lang": "vhdl",
         "sim": "nvc",
-        "sim-version": "master",  # Only master supported for now
+        "sim-version": "r1.11.0",
         "os": "ubuntu-latest",
         "python-version": "3.8",
-        "group": "experimental",
+        "group": "ci",
     },
     # Test Verilator on Ubuntu
     {

{"golden_diff": "diff --git a/.github/generate-envs.py b/.github/generate-envs.py\n--- a/.github/generate-envs.py\n+++ b/.github/generate-envs.py\n@@ -116,10 +116,10 @@\n     {\n         \"lang\": \"vhdl\",\n         \"sim\": \"nvc\",\n-        \"sim-version\": \"master\",  # Only master supported for now\n+        \"sim-version\": \"r1.11.0\",\n         \"os\": \"ubuntu-latest\",\n         \"python-version\": \"3.8\",\n-        \"group\": \"experimental\",\n+        \"group\": \"ci\",\n     },\n     # Test Verilator on Ubuntu\n     {\n", "issue": "NVC: Remove experimental status\nAfter the current pending PRs we can move the next release of NVC out of the experimental CI group and update the docs.\r\n- [x] #3553 / #3559\r\n- [x] #3554 \r\n- [x] NVC release (https://github.com/nickg/nvc/releases/tag/r1.11.0)\r\n- [x] Update docs #3566\r\n\n", "before_files": [{"content": "#!/usr/bin/env python3\n# Copyright cocotb contributors\n# Licensed under the Revised BSD License, see LICENSE for details.\n# SPDX-License-Identifier: BSD-3-Clause\n\n\"\"\"Get a list test environments.\"\"\"\n\nimport argparse\nimport json\nimport sys\n\nENVS = [\n    # Test different Python versions with package managed Icarus on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        # lowest version according to https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.6.7\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        # lowest version according to https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.7.1\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.9\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.10\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.11\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.12\",\n        \"group\": \"ci\",\n    },\n    # A single test for the upcoming Python version.\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.13.0-alpha - 3.13.0\",\n        \"group\": \"experimental\",\n    },\n    # Test Icarus on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"master\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        \"group\": \"experimental\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"v12_0\",  # The latest release version.\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        \"group\": \"experimental\",\n    },\n    # Test GHDL on Ubuntu\n    {\n        \"lang\": \"vhdl\",\n        \"sim\": \"ghdl\",\n        \"sim-version\": \"v2.0.0\",  # GHDL 2.0 is the minimum supported version.\n        \"os\": \"ubuntu-latest\",\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"vhdl\",\n        \"sim\": \"ghdl\",\n        \"sim-version\": \"master\",\n        \"os\": \"ubuntu-latest\",\n        \"python-version\": \"3.8\",\n        \"group\": \"experimental\",\n    },\n    # Test NVC on Ubuntu\n    {\n        \"lang\": \"vhdl\",\n        \"sim\": \"nvc\",\n        \"sim-version\": \"master\",  # Only master supported for now\n        \"os\": \"ubuntu-latest\",\n        \"python-version\": \"3.8\",\n        \"group\": \"experimental\",\n    },\n    # Test Verilator on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"verilator\",\n        \"sim-version\": \"v4.106\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        # Various cocotb tests are known to fail with Verilator 4.106.\n        # Newer versions of Verilator are not working at all.\n        # See also https://github.com/cocotb/cocotb/issues/2300\n        \"group\": \"experimental\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"verilator\",\n        \"sim-version\": \"master\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        # Tests are currently not expected to work at all.\n        # See also https://github.com/cocotb/cocotb/issues/2300\n        \"group\": \"experimental\",\n    },\n    # Test other OSes\n    # Icarus homebrew\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"homebrew-stable\",\n        \"os\": \"macos-11\",\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    # Icarus homebrew (HEAD/master)\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"homebrew-HEAD\",\n        \"os\": \"macos-11\",\n        \"python-version\": \"3.8\",\n        \"group\": \"experimental\",\n    },\n    # Icarus windows from source\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"v12_0\",\n        \"os\": \"windows-latest\",\n        \"python-version\": \"3.8\",\n        \"toolchain\": \"mingw\",\n        \"extra_name\": \"mingw | \",\n        # mingw tests fail silently currently due to test harness limitations.\n        \"group\": \"experimental\",\n    },\n    # use msvc instead of mingw\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"v12_0\",\n        \"os\": \"windows-latest\",\n        \"python-version\": \"3.11\",\n        \"toolchain\": \"msvc\",\n        \"extra_name\": \"msvc | \",\n        \"group\": \"ci\",\n    },\n    # Other\n    # use clang instead of gcc\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"v12_0\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        \"cxx\": \"clang++\",\n        \"cc\": \"clang\",\n        \"extra_name\": \"clang | \",\n        \"group\": \"ci\",\n    },\n    # Test Siemens Questa on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"questa\",\n        \"sim-version\": \"siemens/questa/2023.2\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"vhdl and fli\",\n        \"sim\": \"questa\",\n        \"sim-version\": \"siemens/questa/2023.2\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"vhdl and vhpi\",\n        \"sim\": \"questa\",\n        \"sim-version\": \"siemens/questa/2023.2\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    # Test Aldec Riviera-PRO on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"riviera\",\n        \"sim-version\": \"aldec/rivierapro/2022.04\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"vhdl\",\n        \"sim\": \"riviera\",\n        \"sim-version\": \"aldec/rivierapro/2022.04\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    # Test Cadence Xcelium on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"xcelium\",\n        \"sim-version\": \"cadence/xcelium/2303\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    # Xcelium VHDL (VHPI) is not yet supported.\n    # {\n    #     \"lang\": \"vhdl\",\n    #     \"sim\": \"xcelium\",\n    #     \"sim-version\": \"cadence/xcelium/2303\",\n    #     \"os\": \"ubuntu-20.04\",\n    #     \"self-hosted\": True,\n    #     \"python-version\": \"3.8\",\n    #     \"group\": \"ci\",\n    # },\n]\n\n\ndef main() -> int:\n    parser = argparse.ArgumentParser(description=__doc__)\n    parser.add_argument(\"--group\")\n    parser.add_argument(\"--output-format\", choices=(\"gha\", \"json\"), default=\"json\")\n    parser.add_argument(\n        \"--gha-output-file\",\n        type=argparse.FileType(\"a\", encoding=\"utf-8\"),\n        help=\"The $GITHUB_OUTPUT file.\",\n    )\n\n    args = parser.parse_args()\n\n    if args.group is not None and args.group != \"\":\n        selected_envs = [t for t in ENVS if \"group\" in t and t[\"group\"] == args.group]\n    else:\n        # Return all tasks if no group is selected.\n        selected_envs = ENVS\n\n    # The \"runs-on\" job attribute is a string if we're using the GitHub-provided\n    # hosted runners, or an array with special keys if we're using self-hosted\n    # runners.\n    for env in selected_envs:\n        if \"self-hosted\" in env and env[\"self-hosted\"] and \"runs-on\" not in env:\n            env[\"runs-on\"] = [\"self-hosted\", \"cocotb-private\", env[\"os\"]]\n        else:\n            env[\"runs-on\"] = env[\"os\"]\n\n    if args.output_format == \"gha\":\n        # Output for GitHub Actions (GHA). Appends the configuration to\n        # the file named in the \"--gha-output-file\" argument.\n\n        assert args.gha_output_file is not None\n\n        # The generated JSON output may not contain newlines to be parsed by GHA\n        print(f\"envs={json.dumps(selected_envs)}\", file=args.gha_output_file)\n\n        # Print the the selected environments for easier debugging.\n        print(\"Generated the following test configurations:\")\n        print(json.dumps(selected_envs, indent=2))\n    elif args.output_format == \"json\":\n        print(json.dumps(selected_envs, indent=2))\n    else:\n        assert False\n\n    return 0\n\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n", "path": ".github/generate-envs.py"}], "after_files": [{"content": "#!/usr/bin/env python3\n# Copyright cocotb contributors\n# Licensed under the Revised BSD License, see LICENSE for details.\n# SPDX-License-Identifier: BSD-3-Clause\n\n\"\"\"Get a list test environments.\"\"\"\n\nimport argparse\nimport json\nimport sys\n\nENVS = [\n    # Test different Python versions with package managed Icarus on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        # lowest version according to https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.6.7\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        # lowest version according to https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.7.1\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.9\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.10\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.11\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.12\",\n        \"group\": \"ci\",\n    },\n    # A single test for the upcoming Python version.\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"apt\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.13.0-alpha - 3.13.0\",\n        \"group\": \"experimental\",\n    },\n    # Test Icarus on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"master\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        \"group\": \"experimental\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"v12_0\",  # The latest release version.\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        \"group\": \"experimental\",\n    },\n    # Test GHDL on Ubuntu\n    {\n        \"lang\": \"vhdl\",\n        \"sim\": \"ghdl\",\n        \"sim-version\": \"v2.0.0\",  # GHDL 2.0 is the minimum supported version.\n        \"os\": \"ubuntu-latest\",\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"vhdl\",\n        \"sim\": \"ghdl\",\n        \"sim-version\": \"master\",\n        \"os\": \"ubuntu-latest\",\n        \"python-version\": \"3.8\",\n        \"group\": \"experimental\",\n    },\n    # Test NVC on Ubuntu\n    {\n        \"lang\": \"vhdl\",\n        \"sim\": \"nvc\",\n        \"sim-version\": \"r1.11.0\",\n        \"os\": \"ubuntu-latest\",\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    # Test Verilator on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"verilator\",\n        \"sim-version\": \"v4.106\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        # Various cocotb tests are known to fail with Verilator 4.106.\n        # Newer versions of Verilator are not working at all.\n        # See also https://github.com/cocotb/cocotb/issues/2300\n        \"group\": \"experimental\",\n    },\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"verilator\",\n        \"sim-version\": \"master\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        # Tests are currently not expected to work at all.\n        # See also https://github.com/cocotb/cocotb/issues/2300\n        \"group\": \"experimental\",\n    },\n    # Test other OSes\n    # Icarus homebrew\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"homebrew-stable\",\n        \"os\": \"macos-11\",\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    # Icarus homebrew (HEAD/master)\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"homebrew-HEAD\",\n        \"os\": \"macos-11\",\n        \"python-version\": \"3.8\",\n        \"group\": \"experimental\",\n    },\n    # Icarus windows from source\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"v12_0\",\n        \"os\": \"windows-latest\",\n        \"python-version\": \"3.8\",\n        \"toolchain\": \"mingw\",\n        \"extra_name\": \"mingw | \",\n        # mingw tests fail silently currently due to test harness limitations.\n        \"group\": \"experimental\",\n    },\n    # use msvc instead of mingw\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"v12_0\",\n        \"os\": \"windows-latest\",\n        \"python-version\": \"3.11\",\n        \"toolchain\": \"msvc\",\n        \"extra_name\": \"msvc | \",\n        \"group\": \"ci\",\n    },\n    # Other\n    # use clang instead of gcc\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"icarus\",\n        \"sim-version\": \"v12_0\",\n        \"os\": \"ubuntu-20.04\",\n        \"python-version\": \"3.8\",\n        \"cxx\": \"clang++\",\n        \"cc\": \"clang\",\n        \"extra_name\": \"clang | \",\n        \"group\": \"ci\",\n    },\n    # Test Siemens Questa on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"questa\",\n        \"sim-version\": \"siemens/questa/2023.2\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"vhdl and fli\",\n        \"sim\": \"questa\",\n        \"sim-version\": \"siemens/questa/2023.2\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"vhdl and vhpi\",\n        \"sim\": \"questa\",\n        \"sim-version\": \"siemens/questa/2023.2\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    # Test Aldec Riviera-PRO on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"riviera\",\n        \"sim-version\": \"aldec/rivierapro/2022.04\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    {\n        \"lang\": \"vhdl\",\n        \"sim\": \"riviera\",\n        \"sim-version\": \"aldec/rivierapro/2022.04\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    # Test Cadence Xcelium on Ubuntu\n    {\n        \"lang\": \"verilog\",\n        \"sim\": \"xcelium\",\n        \"sim-version\": \"cadence/xcelium/2303\",\n        \"os\": \"ubuntu-20.04\",\n        \"self-hosted\": True,\n        \"python-version\": \"3.8\",\n        \"group\": \"ci\",\n    },\n    # Xcelium VHDL (VHPI) is not yet supported.\n    # {\n    #     \"lang\": \"vhdl\",\n    #     \"sim\": \"xcelium\",\n    #     \"sim-version\": \"cadence/xcelium/2303\",\n    #     \"os\": \"ubuntu-20.04\",\n    #     \"self-hosted\": True,\n    #     \"python-version\": \"3.8\",\n    #     \"group\": \"ci\",\n    # },\n]\n\n\ndef main() -> int:\n    parser = argparse.ArgumentParser(description=__doc__)\n    parser.add_argument(\"--group\")\n    parser.add_argument(\"--output-format\", choices=(\"gha\", \"json\"), default=\"json\")\n    parser.add_argument(\n        \"--gha-output-file\",\n        type=argparse.FileType(\"a\", encoding=\"utf-8\"),\n        help=\"The $GITHUB_OUTPUT file.\",\n    )\n\n    args = parser.parse_args()\n\n    if args.group is not None and args.group != \"\":\n        selected_envs = [t for t in ENVS if \"group\" in t and t[\"group\"] == args.group]\n    else:\n        # Return all tasks if no group is selected.\n        selected_envs = ENVS\n\n    # The \"runs-on\" job attribute is a string if we're using the GitHub-provided\n    # hosted runners, or an array with special keys if we're using self-hosted\n    # runners.\n    for env in selected_envs:\n        if \"self-hosted\" in env and env[\"self-hosted\"] and \"runs-on\" not in env:\n            env[\"runs-on\"] = [\"self-hosted\", \"cocotb-private\", env[\"os\"]]\n        else:\n            env[\"runs-on\"] = env[\"os\"]\n\n    if args.output_format == \"gha\":\n        # Output for GitHub Actions (GHA). Appends the configuration to\n        # the file named in the \"--gha-output-file\" argument.\n\n        assert args.gha_output_file is not None\n\n        # The generated JSON output may not contain newlines to be parsed by GHA\n        print(f\"envs={json.dumps(selected_envs)}\", file=args.gha_output_file)\n\n        # Print the the selected environments for easier debugging.\n        print(\"Generated the following test configurations:\")\n        print(json.dumps(selected_envs, indent=2))\n    elif args.output_format == \"json\":\n        print(json.dumps(selected_envs, indent=2))\n    else:\n        assert False\n\n    return 0\n\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n", "path": ".github/generate-envs.py"}]}