mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 06:43:14 +02:00
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.
27 lines
736 B
PowerShell
27 lines
736 B
PowerShell
# DESCRIPTION: Verilator: CI Windows Power Shell - Verilate a test
|
|
#
|
|
# SPDX-FileCopyrightText: 2024 Wilson Snyder
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
################################################################################
|
|
|
|
|
|
Set-PSDebug -Trace 1
|
|
|
|
$NPROC = $env:NUMBER_OF_PROCESSORS
|
|
|
|
cd install
|
|
$Env:VERILATOR_ROOT=$PWD
|
|
cd examples/cmake_tracing_c
|
|
mkdir build
|
|
cd build
|
|
# /Od skips optimization; this only checks the example verilates and builds, so
|
|
# an optimized binary is not needed (see ci-win-compile.ps1).
|
|
cmake .. "-DCMAKE_CXX_FLAGS_RELEASE=/Od /DNDEBUG"
|
|
cmake --build . --config Release -j $NPROC
|
|
|
|
# TODO put this back in, see issue# 5163
|
|
# Release/example.exe
|
|
|
|
cd ..
|
|
Remove-Item -path build -recurse
|