Commit Graph

157 Commits

Author SHA1 Message Date
Geza Lore 39b646349f
Add --enable-light-debug configure option (#7886)
Change default debug build to use -O0 instead of -Og as the latter is
still not great debugging experience. Use -Og -gz, plus the new -ggdb1,
which together significantly cut down debug info size, to save CI cache
space, while still enabling -gdbbt tests to work.
2026-07-06 18:02:37 +01:00
Geza Lore fcc7acbfc6
CI: Factor out artifact based caching as a reusable action (#7883) 2026-07-06 14:16:06 +01:00
Geza Lore bf4c72f93b
CI: Squash macos brew warning (#7881) 2026-07-06 11:43:55 +01:00
Geza Lore c2ed0aab00
CI: Use ci-install.bash for lint-py dependencies (#7880) 2026-07-06 11:27:58 +01:00
Geza Lore 5750c888a6
CI: Improve ccache handling in build and test jobs (#7874)
Cache key isolation: Include the build flavour (ccwarn/asan/gcov) in the
build ccache key, so the coverage (gcov), asan, and RTLMeter
(ccwarn-off) configurations no longer share and thrash the single
'<runs-on>-<cc>' bucket, nor warm-start from each other's (near-useless)
caches.

Prune stale entries instead of a fixed size cap: After building/testing,
evict ccache entries this run did not touch (--evict-older-than, based
on the run's own duration).  This bounds the saved cache to the current
working set, so CCACHE_MAXSIZE and CCACHE_LIMIT_MULTIPLE are no longer
needed and are removed (ccache falls back to its 5G default ceiling, but
is realistically much smaller).

ccache configuration:
- Drop CCACHE_COMPRESS (already the default in ccache 4.x).
- Add CCACHE_COMPILERCHECK=content, so a changed compiler mtime on a rebuilt
  ephemeral runner image does not invalidate the whole restored cache.
- Hoist all ccache-related variables (CACHE_BASE_KEY, CCACHE_*, CXX) to the
  workflow-level env.

Remove dead ccache scaffolding:
- reusable-lint-py: the job never compiles or caches; drop its ccache env.
- reusable-rtlmeter-run: remove the disabled persistent-cache step and its
  storage variables; keep CCACHE_DISABLE=1, since caching must stay off to
  keep RTLMeter timings representative.

Store test job ccache as artifacts for reuse
2026-07-06 01:44:32 +01:00
Geza Lore cbd78e689c
CI: Cleanup Windows build (#7873)
The Windows build never actually used ccache; the '.ccache' directory
only ever held the win_flex_bison install, and cmake/MSVC did no compiler
caching. Clean this up:

- Drop the CCACHE_* environment variables from the job (meaningless here).
- Store win_flex_bison in a dedicated 'win_flex_bison' directory instead of
  the misleadingly named '.ccache', and cache just that (static key, as it
  is a fixed third-party tool).
- Set WIN_FLEX_BISON inside ci-win-compile.ps1 as an absolute path, rather
  than in the workflow, making the script self-contained.
- Use the runner's processor count for build parallelism instead of a fixed
  '-j 3', in both ci-win-compile.ps1 and ci-win-test.ps1.
- Remove the verilator-win.zip archive and upload steps; nothing consumes
  that artifact.
- Build Verilator with the Ninja generator from an MSVC developer shell
  instead of MSBuild. MSBuild only parallelizes across projects, and
  Verilator is a single project, so it compiled serially; Ninja keeps all
  cores busy. Also compile with /Od: this job only checks that Verilator
  builds and can verilate an example, so an optimized binary is not needed
  and the otherwise-dominant optimizer time is wasted.
2026-07-05 19:15:09 +01:00
Geza Lore 8d0c75171c
CI: Unify regression and RTLMeter build jobs to one (#7872)
- Merge reusable-rtlmeter-build.yml into reusable-build.yml, selected by
  an 'install' flag: archive the installed Verilator for RTLMeter, or
  the whole repository tree for the test jobs.
- Align reusable-test.yml input arguments with  reusable-build.yml
- Pass build/test options as booleans instead of 0/1.
- Inline the single-entry build matrices, and hoist matrix keys that are
  constant across a job.
2026-07-05 18:52:55 +01:00
Geza Lore 6e06cd18da
CI: Decouple build and test into separate scripts, simplify workflows (#7871)
- Split the monolithic ci-script.bash into ci-build.bash and
  ci-test.bash, with shared setup in ci-common.bash.
- Pass job parameters as explicit command-line options rather than
  environment variables (--compiler, --prefix, --suite, --asan,
  --gcov, --reloc, --ccwarn).
- Detect the host OS and distribution at runtime (uname,
  /etc/os-release) instead of the legacy Travis-era CI_OS_NAME,
  CI_RUNS_ON and CI_BUILD_STAGE_NAME variables.
- Remove dead code: FreeBSD support, Windows wavediff install, the
  unused CI_COMMIT variable, and various redundant operations.
- Inline the single-entry build-job matrices.
- Rename osx to macOS
- Refuse to run these ci scripts outside GitHub Actions to protect
  developer checkouts.
2026-07-05 15:46:30 +01:00
Geza Lore 1bab793c75 CI: Fix deleting pr notifications after multiple reruns 2026-07-04 22:46:19 +01:00
Wilson Snyder 749b93e405 Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
Geza Lore c5945021c1
CI: Improve RTLMeter PR report (#7740)
- If any simulated cycle counts mismatch, report them and fail the job
- Keep "Elapsed" only in cppbuild
- Ignore "Elapsed" and "CPU" samples less than 30 seconds - too noisy
- Widen acceptable ranges on "Elapsed" and "Memory"
- Add badge legend
2026-06-08 22:22:52 +01:00
Geza Lore 5cb8d8291a
CI: Load RTLMeter cases to run from separate file (#7730)
Add a script that prints the job matrix of cases to run with RTLMeter.
This enables running different sets based on parameters. It will run
everything on scheduled nightly runs, but only a subset on PRs (to reduce
time and variance due to short cases).

Also prints the job matrix in descending duration order, which
effectively makes GitHub actions schedule longest jobs first to reduce
total workflow latency.
2026-06-07 20:50:31 +01:00
Geza Lore 220e46994c
CI: Combine RTLMeter collate step to reduce job count (#7729) 2026-06-07 20:30:57 +01:00
Geza Lore 83ef69d866
CI: Run RTLMeter on the same machine with target commit (#7726) 2026-06-07 15:36:34 +01:00
Geza Lore 4e3be56415
CI: Improve RTLMeter reports (#7725) 2026-06-07 11:50:02 +01:00
Geza Lore 4ee19c4065 CI: Generate whole RTLMeter report in ci-rtlmeter-report.bash 2026-06-07 09:54:40 +01:00
Geza Lore 067cd6c9c6 CI: Show summary tables in 'pr: rtlmeter' results 2026-06-06 19:10:27 +01:00
Todd Strader 15163d1e39
Tests: Switch VCD/FST compare to wavediff (#7426) 2026-04-21 13:53:53 -04:00
Wilson Snyder c8a596e43e CI: Fix ubuntu-24.04-riscv needing install --yes, no systemc 2026-03-30 19:09:22 -04:00
Wilson Snyder 7fc76dd9d3 Fix Ubuntu 26.04.beta issues 2026-03-26 22:33:20 -04:00
Yangyu Chen bb5a9dc247
Support jemalloc as the default allocator on Linux (#7250)
Add jemalloc as an alternative malloc implementation for the Verilator
binary. When both tcmalloc and jemalloc are available, jemalloc is
preferred due to its better performance on RTLMeter.

The new --enable-jemalloc flag (default=check) mirrors the existing
--enable-tcmalloc behavior: auto-detected at configure time, supports
both static and dynamic linking, and is disabled when --enable-dev-asan
is active.
2026-03-13 17:08:15 -04:00
Wilson Snyder f74a581d97 Tests: Enforce SPDX-FileCopyrightText 2026-02-22 15:23:19 -05:00
Geza Lore 021e0ba81b
Testing: Bump vcddiff to latest (#7040) 2026-02-10 20:08:23 +00:00
Wilson Snyder 7c6c6a684b Add SPDX copyright identifiers, and get 'reuse' clean. No functional change. 2026-01-26 20:24:34 -05:00
Wilson Snyder 430015e234 CI: Add retry on apt/pip 2026-01-25 10:27:52 -05:00
Wilson Snyder 13327fa9c0 Copyright year update. 2026-01-01 07:22:09 -05:00
Wilson Snyder 24117bc599 Internals: Add format-bash make rule (not in automatic format) 2025-11-22 12:30:29 -05:00
Wilson Snyder 91a59bbcc5 Documentation: Adapt format suggested by docstrfmt 2025-11-22 10:59:38 -05:00
Wilson Snyder 4cc4ff3e07 Commentary: Fix some .rst style issues 2025-11-21 22:25:03 -05:00
Geza Lore 04e39168c4
CI: Disable ccache on macOS (#6607) 2025-10-28 18:11:04 +00:00
Geza Lore c8c53f9a18 Tests: Remove sanitize option and parameter
Fixes #6536
2025-10-08 08:51:42 +01:00
Geza Lore 832f41f0fe
Internals: Hide CC make rules (#6537)
All code is built as C++ via CXX, but we still have some references to
CC. Trying to make sure we don't add plain C later by hiding the C
compiler. (So it's always enough to override CXX=... in configure)
2025-10-07 17:37:42 +01:00
Geza Lore 97707bdc72
CI: Run coverage job on 'pr: dev-coverage' label in PRs (#6527) 2025-10-07 17:03:13 +01:00
Geza Lore d7fbea62f9 CI: Notify PRs when coverage report is available 2025-10-07 12:58:21 +01:00
Geza Lore b4d064d166 CI: Deploy coverage reports to GitHub pages 2025-10-05 07:47:59 +01:00
Geza Lore ce0a05691b
Internals: Improve coverage flow (#6526)
See addes "Code coverage" section in docs/internals.rst
2025-10-03 17:18:24 +01:00
Geza Lore 62dbbbba85 Internals: Rename --enable-asan to --enable-dev-asan and related 2025-10-03 12:26:48 +01:00
Geza Lore 0e2f0381d0
CI: Improve and cleanup (#6448)
Chores:
- Remove ci-ccache-maint. This has never been useful and is just cruft.
- Remove then unused CI_COMMIT
- Change job names so they come out nicer in the web views
- Make os-name input to reusable-build always explicit

Improvements:
- Have at most build-test job in progress per branch
- Cancel in-progress build-test jobs on PRs
- In forks (that is, not on 'verilator/verilator'), cancel any
  in-progress build-test jobs on push to the branch
2025-09-17 20:41:29 +01:00
Geza Lore 4ab0690428
CI: Add -DVL_LEAK_CHECKS in asan builds (#6444) 2025-09-17 00:18:58 +01:00
Geza Lore 77e5bb9ec9
CI: Run 24.04 clang build/test with --enable-asan (#6408) 2025-09-09 15:15:29 +01:00
Wilson Snyder d186dcdc32
ci: avoid man page builds (#6398) 2025-09-06 18:48:39 -04:00
Lan Zongwei c03cb9d9c2
CI: introduce osx-build github workflow (#6352). 2025-08-31 12:58:05 -04:00
Tobias Rosenkranz 92970bd9a0
Update docker base image to Ubuntu 24.04 (#6147) 2025-07-03 15:29:03 -04:00
Tobias Rosenkranz db854fc3d2
Improve docker image size (#6139) 2025-06-30 08:04:18 -04:00
Wilson Snyder 610b2e75af CI: Add vltmt-2 to bring longpath test time down 2025-03-29 06:54:30 -04:00
Wilson Snyder d26d62a176 Tests: Add driver.py --driver-clean 2025-03-27 18:33:18 -04:00
Wilson Snyder 464e19caaa Tests: Fix ubuntu24.04-arm issues 2025-03-22 16:55:53 -04:00
Mateusz Gancarz 9b4509f7d9
Add `--trace-saif` for SAIF power traces (#5812) 2025-03-07 10:41:29 -05:00
Geza Lore 2cad858d32
Bump vcddiff (#5828)
For #5806 via veripool/vcddiff#5
2025-03-04 16:21:25 +00:00
Geza Lore bab949a468
Use tcmalloc on non 22.04 CI builds (#5818) 2025-03-02 08:13:20 +00:00