-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Backport changes from master #3775
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## stable/1.8 #3775 +/- ##
==============================================
+ Coverage 60.23% 64.34% +4.10%
==============================================
Files 49 49
Lines 8845 9115 +270
Branches 2466 2454 -12
==============================================
+ Hits 5328 5865 +537
- Misses 2438 2658 +220
+ Partials 1079 592 -487 ☔ View full report in Codecov by Sentry. |
27d6d0f
to
805aeb2
Compare
Hm, the flake8 lint errors don't make any sense:
The commit that's tested is https://github.com/cocotb/cocotb/blob/6cf80c02b40af81ca0b038e2f0298349870e97ea/cocotb/types/logic_array.py, and in line 163 I don't see any membership test that would trigger flake8. I also don't see anything like these messages locally ... More investigation needed. |
flake8 is losing its damn mind... checking the contents of strings... |
805aeb2
to
08abfa5
Compare
08abfa5
to
b405e77
Compare
b405e77
to
4afe0a4
Compare
The failing test passes with pytest<7. There was a change in behavior that causes a different exception to be raised if an exception is raised in a I suggest changing the test to skip Icarus since that element being tested is ifdef'd out of the SV source for Icarus. |
Ah, it's pytest that changed ... I was about to loose my mind over it. (The beauty of not pinning versions.) Thanks! Do we have a change on master that fixes the test? (I couldn't find it, but now at least I have a better idea how to locally reproduce what I'm seeing in CI.) |
@imphil That test was deleted on master because it was for deprecated (now removed) functionality. |
Pytest 8 introduced new behavior for `pytest.warn()`, which isn't compatible with our code in `test_unicode_handle_assignment_deprecated`. Update the test to be skipped entirely for Icarus and GHDL instead of testing for specific exceptions. (The test doesn't do anything on these simulators anyways.) See also pytest-dev/pytest#11129 Error message, as seen in CI: ``` 1.00ns INFO cocotb.regression running test_unicode_handle_assignment_deprecated (2/195) 1.00ns INFO cocotb.regression test_unicode_handle_assignment_deprecated failed: errored with unexpected type Traceback (most recent call last): File "/home/runner/work/cocotb/cocotb/tests/test_cases/test_cocotb/test_deprecated.py", line 39, in test_unicode_handle_assignment_deprecated dut.stream_in_string.value = "Bad idea" File "/home/runner/work/cocotb/cocotb/.nox/dev_test_sim-sim-icarus-toplevel_lang-verilog-gpi_interface-vpi/lib/python3.8/site-packages/cocotb/handle.py", line 370, in __getattr__ raise AttributeError(f"{self._name} contains no object named {name}") AttributeError: sample_module contains no object named stream_in_string During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/runner/work/cocotb/cocotb/tests/test_cases/test_cocotb/test_deprecated.py", line 39, in test_unicode_handle_assignment_deprecated dut.stream_in_string.value = "Bad idea" File "/home/runner/work/cocotb/cocotb/.nox/dev_test_sim-sim-icarus-toplevel_lang-verilog-gpi_interface-vpi/lib/python3.8/site-packages/_pytest/recwarn.py", line 322, in __exit__ fail( File "/home/runner/work/cocotb/cocotb/.nox/dev_test_sim-sim-icarus-toplevel_lang-verilog-gpi_interface-vpi/lib/python3.8/site-packages/_pytest/outcomes.py", line 166, in fail raise Failed(msg=reason, pytrace=pytrace) Failed: DID NOT WARN. No warnings of type (<class 'DeprecationWarning'>,) were emitted. Emitted warnings: []. ```
54754dd
to
03fc611
Compare
RTD failed with |
(cherry picked from commit 35114fc)
v12 of Icarus Verilog went out in June. Update to this version, which is also newer than the git commit we used in some places. (cherry picked from commit 8015f1d)
Depending on the toplevel language, we're running a very different set of tests. Include it in the name to make the tests unambiguous. While at it, refactor the code a bit to * place the generation of the human-readable job name into the Python script * reuse the name in the Codecov upload, instead of assembling it twice (we can do that now that we have the name in the matrix configuration) * consistently use hyphens as delimitter in matrix env keys * shorten the simulator version number by removing the module name prefix (e.g. 'siemens/questa/2023.2' to '2023.2') * shorten the name by removing spaces around the pipe symbol. A shorter name helps to display more of it in the left navigation bar of the GH Checks view. (cherry picked from commit 866df6f, plus formatting updates for this branch)
(cherry picked from commit 46f570d)
It's pytest 8 that introduces the breakage. That also explains why the Icarus + Python 3.6 and 3.7 tests were passing: pytest 7 dropped Python 3.6 support, and pytest 8 dropped Python 3.7 support. Those two Python versions were picking up older pytest versions, which made the tests pass.
Yes, that's the approach I went for. |
See cocotb#3587 for a detailed description of why these waivers are necessary. (cherry picked from commit 0a9b372)
Riviera 2023.04 has fixed the underlying issue that prevented test_both_edge_triggers to run in this simulator, remove the test exclusion. References: SPT81300 (Aldec) cocotb#2344 (cocotb) (cherry picked from commit 5cdf26c)
(cherry picked from commit c7347b3)
Labels in GitHub Actions are used to determine which runner can execute a CI job. With our setup of self-hosted and GitHub-hosted runners, labels decide if a job gets to run on our own infrastructure, or on GitHub infrastructure. Right now, we're assinging the labels "self-hosted", "ubuntu-20.04", "cocotb-private", "X64" and "Linux" to all self-hosted runners. All jobs that we want to run on our self-hosted runners get the labels "self-hosted", "cocotb-private", and "ubuntu-20.04" assigned. Jobs that we want to run on the GitHub-provided runners only get a single label, the operating system, such as "ubuntu-20.04". As it turns out, a job gets executed on a particular runner as soon as all labels assigned *to the job* are matching labels assigned to the runner. For us, this meant a job assigned only the label "ubuntu-20.04" (a job which we want to execute on GitHub-provided runners) got executed on our self-hosted runners, since "ubuntu-20.04" is one of the labels of our self-hosted runners as well. Avoid this situation by using label names for our self-hosted runner which are not used by GitHub runners (https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job). See also philips-labs/terraform-aws-github-runner#3290 for a discussion and https://github.com/philips-labs/terraform-aws-github-runner/blob/6fa667fae7e4302cf643bcdb4ff3c91b1e4ed8d1/lambdas/functions/webhook/src/webhook/index.ts#L83-L86 for the label matching code. (cherry picked from commit 7b84015)
We always want to have the latest release version of a simulator in CI, move the Icarus 12.0 run from the experimental to the ci bucket. (cherry picked from commit 6cde941)
Run the latest release version of GHDL in CI (which is version 4.0 at this time), and move all other GHDL versions into the extended bucket. (cherry picked from commit 0270a29)
In the previous private CI setup, we ran a number of Questa and Riviera-PRO versions in extended tests. Add those same tests to our new CI setup. (cherry picked from commit 3c767af)
1bccc2e
to
0dfa931
Compare
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> (cherry picked from commit cc9694d)
(cherry picked from commit 58b5e38)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 86b7a17)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit bc3ddff)
cocotb#3593 updated the version of actions/upload-artifact from 3 to 4, but didn't perform the migration as described at https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md. Do that to fix the broken release CI. (cherry picked from commit c05526e)
Update to the latest version of the codecov GH Action and its uploader. Most notably, this action now uses nodejs 20 instead of 16, which GitHub prominently warns about. Less notably, this action is a significant rewrite from the previous version, which uses the codecov-cli behind the covers. (cherry picked from commit e1b92e9)
OK, looks promising now. CI should be close to what we have in master, with the notable exceptions of Verilator and NVC (which require code changes to work). |
Backport all CI changes from master to get a running CI setup for
the stable/1.8 branch.