mirror of
https://github.com/verilator/verilator.git
synced 2026-09-07 01:11:01 +02:00
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
172 lines
4.6 KiB
YAML
172 lines
4.6 KiB
YAML
---
|
|
# DESCRIPTION: Github actions config
|
|
# This name is key to badges in README.rst, so we use the name build
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
|
|
name: build-test
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- 'dependabot/**' # Avoid duplicates: only run the PR, not the push
|
|
pull_request:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 0 * * 0' # weekly
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: repo
|
|
|
|
concurrency:
|
|
# At most 1 job per branch. Auto cancel on pull requests and on all forks
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'verilator/verilator' }}
|
|
|
|
jobs:
|
|
|
|
build-2604-gcc:
|
|
name: Build | 26.04 | gcc
|
|
uses: ./.github/workflows/reusable-build.yml
|
|
with:
|
|
cc: gcc
|
|
runs-on: ubuntu-26.04
|
|
sha: ${{ github.sha }}
|
|
|
|
build-2604-clang:
|
|
name: Build | 26.04 | clang
|
|
uses: ./.github/workflows/reusable-build.yml
|
|
with:
|
|
cc: clang
|
|
dev-asan: true # Build (and run) with address sanitizer
|
|
runs-on: ubuntu-26.04
|
|
sha: ${{ github.sha }}
|
|
|
|
build-2404-gcc:
|
|
name: Build | 24.04 | gcc
|
|
uses: ./.github/workflows/reusable-build.yml
|
|
with:
|
|
cc: gcc
|
|
runs-on: ubuntu-24.04
|
|
sha: ${{ github.sha }}
|
|
|
|
build-2404-clang:
|
|
name: Build | 24.04 | clang
|
|
uses: ./.github/workflows/reusable-build.yml
|
|
with:
|
|
cc: clang
|
|
runs-on: ubuntu-24.04
|
|
sha: ${{ github.sha }}
|
|
|
|
build-2204-gcc:
|
|
name: Build | 22.04 | gcc
|
|
uses: ./.github/workflows/reusable-build.yml
|
|
with:
|
|
cc: gcc
|
|
runs-on: ubuntu-22.04
|
|
sha: ${{ github.sha }}
|
|
|
|
build-macos-15-clang:
|
|
name: Build | macos-15 | clang
|
|
uses: ./.github/workflows/reusable-build.yml
|
|
with:
|
|
cc: clang
|
|
runs-on: macos-15
|
|
sha: ${{ github.sha }}
|
|
|
|
build-windows:
|
|
name: Build | windows-2025-vs2026 | msvc
|
|
runs-on: windows-2025-vs2026
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
with:
|
|
path: repo
|
|
- name: Cache win_flex_bison
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
|
|
with:
|
|
path: ${{ github.workspace }}/win_flex_bison
|
|
key: win_flex_bison
|
|
- name: compile
|
|
run: ./ci/ci-win-compile.ps1
|
|
- name: test build
|
|
run: ./ci/ci-win-test.ps1
|
|
|
|
test-2604-gcc:
|
|
name: Test | 26.04 | gcc | ${{ matrix.suite }}
|
|
needs: build-2604-gcc
|
|
uses: ./.github/workflows/reusable-test.yml
|
|
with:
|
|
archive: ${{ needs.build-2604-gcc.outputs.archive }}
|
|
cc: gcc
|
|
runs-on: ubuntu-26.04
|
|
suite: ${{ matrix.suite }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2]
|
|
|
|
test-2604-clang:
|
|
name: Test | 26.04 | clang | ${{ matrix.suite }}
|
|
needs: build-2604-clang
|
|
uses: ./.github/workflows/reusable-test.yml
|
|
with:
|
|
archive: ${{ needs.build-2604-clang.outputs.archive }}
|
|
cc: clang
|
|
runs-on: ubuntu-26.04
|
|
suite: ${{ matrix.suite }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2]
|
|
|
|
test-2404-gcc:
|
|
name: Test | 24.04 | gcc | ${{ matrix.suite }}
|
|
needs: build-2404-gcc
|
|
uses: ./.github/workflows/reusable-test.yml
|
|
with:
|
|
archive: ${{ needs.build-2404-gcc.outputs.archive }}
|
|
cc: gcc
|
|
runs-on: ubuntu-24.04
|
|
suite: ${{ matrix.suite }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2]
|
|
|
|
test-2404-clang:
|
|
name: Test | 24.04 | clang | ${{ matrix.suite }}
|
|
needs: build-2404-clang
|
|
uses: ./.github/workflows/reusable-test.yml
|
|
with:
|
|
archive: ${{ needs.build-2404-clang.outputs.archive }}
|
|
cc: clang
|
|
reloc: true # Test with relocated installation
|
|
runs-on: ubuntu-24.04
|
|
suite: ${{ matrix.suite }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2]
|
|
|
|
test-2204-gcc:
|
|
name: Test | 22.04 | gcc | ${{ matrix.suite }}
|
|
needs: build-2204-gcc
|
|
uses: ./.github/workflows/reusable-test.yml
|
|
with:
|
|
archive: ${{ needs.build-2204-gcc.outputs.archive }}
|
|
cc: gcc
|
|
runs-on: ubuntu-22.04
|
|
suite: ${{ matrix.suite }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2]
|
|
|
|
lint-py:
|
|
name: Lint Python
|
|
uses: ./.github/workflows/reusable-lint-py.yml
|