mirror of
https://github.com/verilator/verilator.git
synced 2026-09-07 10:01:11 +02:00
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.
This commit is contained in:
@@ -88,32 +88,19 @@ jobs:
|
||||
build-windows:
|
||||
name: Build | windows-2025-vs2026 | msvc
|
||||
runs-on: windows-2025-vs2026
|
||||
env:
|
||||
CCACHE_COMPRESS: 1
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
CCACHE_LIMIT_MULTIPLE: 0.95
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||
with:
|
||||
path: repo
|
||||
- name: Cache $CCACHE_DIR
|
||||
- name: Cache win_flex_bison
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: msbuild-msvc-cmake
|
||||
path: ${{ github.workspace }}/win_flex_bison
|
||||
key: win_flex_bison
|
||||
- name: compile
|
||||
env:
|
||||
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache
|
||||
run: ./ci/ci-win-compile.ps1
|
||||
- name: test build
|
||||
run: ./ci/ci-win-test.ps1
|
||||
- name: Zip up repository
|
||||
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
|
||||
- name: Upload zip archive
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
||||
with:
|
||||
path: ${{ github.workspace }}/repo/verilator.zip
|
||||
name: verilator-win.zip
|
||||
|
||||
test-2604-gcc:
|
||||
name: Test | 26.04 | gcc | ${{ matrix.suite }}
|
||||
|
||||
Reference in New Issue
Block a user