mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 01:23:24 -08:00
[CI] Collect an MSBuild performance summary and binary log on request (#7378)
The Windows job spends about 28 minutes inside one "Build project" group, with nothing in it that says where the time goes: MSBuild runs single-node because no --parallel is passed, so projects build one after another and it is not visible which projects, tasks or phases are responsible. Add a --profile flag that makes the Windows build write -flp:PerformanceSummary and -bl, repeat the summary in the job log so the numbers need no download, and report the core count, which decides how much parallelism is worth asking for. The binary log is uploaded as an artifact only on the runs that asked for it. The workflow drives it from a build_profile matrix key that is empty by default, so no build changes behaviour until someone sets it. Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
25c85cf0bb
commit
eefe0bd672
2 changed files with 55 additions and 2 deletions
16
.github/workflows/desktop-build.yml
vendored
16
.github/workflows/desktop-build.yml
vendored
|
|
@ -385,6 +385,10 @@ jobs:
|
|||
target: 10
|
||||
runner: windows-2025 # https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-VS2026-Readme.md
|
||||
|
||||
# Set build_profile: 1 to have the build write an MSBuild performance
|
||||
# summary and a binary log; empty on every entry that runs by default.
|
||||
build_profile: ''
|
||||
|
||||
cmake_generator: "Visual Studio 18 2026"
|
||||
cmake_generator_platform: x64
|
||||
make_package: 1
|
||||
|
|
@ -400,6 +404,7 @@ jobs:
|
|||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 100
|
||||
env:
|
||||
BUILD_PROFILE: '${{ matrix.build_profile }}'
|
||||
CCACHE_DIR: ${{ github.workspace }}/.cache/
|
||||
CCACHE_SIZE: 600M # space of all repo is 10Gi: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
|
||||
|
||||
|
|
@ -701,6 +706,17 @@ jobs:
|
|||
build/oracle/Release/*.pdb
|
||||
build/servatrice/Release/*.pdb
|
||||
|
||||
# Written only when the matrix entry sets build_profile, so the artifact
|
||||
# exists exactly on the runs that were asked to produce one.
|
||||
- name: "[Windows] Upload MSBuild binary log"
|
||||
if: always() && matrix.os == 'Windows' && env.BUILD_PROFILE == '1'
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ steps.build.outputs.name }}-msbuild
|
||||
path: build/msbuild.binlog
|
||||
retention-days: 7
|
||||
|
||||
- name: "Upload to release"
|
||||
if: needs.configure.outputs.tag != null && matrix.make_package == '1'
|
||||
id: upload_release
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue