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
- 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.
- 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.
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)
Add an explicit 'sha' parameter to reusable-build, to define which
commit to build. This will be needed for PR coverage jobs. Consequently
use the 'archive' output from reusable-build to simplify retrieving the
resulting artifact in dependent jobs. Also fetch full history in
coverage builds.
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