Skip to content

debug 00

debug 00 #1189

Workflow file for this run

# Copyright (c) 2023-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
name: CMake
on:
# Running for pushes is enough in the cmake-staging branch.
# pull_request:
push:
branches:
- '**'
tags-ignore:
- '**'
concurrency:
group: ${{ github.workflow }}${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
cancel-in-progress: true
jobs:
win64-native-builtin-tools:
name: ${{ matrix.conf.name }}
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
conf:
- name: 'Win64, VS 2022, dynamic'
triplet: 'x64-windows'
preset: 'vs2022'
- name: 'Win64, VS 2022, static'
triplet: 'x64-windows-static'
preset: 'vs2022-static'
env:
CI_CCACHE_VERSION: '4.10.0'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Remove non-MSVC tool installations
run: |
Remove-Item -Path "$env:ProgramFiles/CMake" -Recurse -Force
- name: Configure Visual Studio Developer PowerShell
# Using microsoft/setup-msbuild is not enough as it does not add other Visual Studio tools to PATH.
uses: ilammy/msvc-dev-cmd@v1
- name: Check build tools
run: |
cmake --version | Out-File -FilePath "cmake_version"
Get-Content -Path "cmake_version"
Write-Output "---"
msbuild -version | Out-File -FilePath "msbuild_version"
Get-Content -Path "msbuild_version"
Write-Output "---"
$env:VCToolsVersion | Out-File -FilePath "toolset_version"
Get-Content -Path "toolset_version"
# GHA Windows images have different versions of MSVC toolsets being installed
# side-by-side. Therefore, the VCPKG_PLATFORM_TOOLSET_VERSION must be set explicitly
# to avoid linker errors when using vcpkg in the manifest mode.
# See: https://github.com/bitcoin/bitcoin/pull/28934
Add-Content -Path "$env:VCPKG_INSTALLATION_ROOT\triplets\${{ matrix.conf.triplet }}.cmake" -Value "set(VCPKG_PLATFORM_TOOLSET_VERSION $env:VCToolsVersion)"
# Skip debug configuration to speed up build and minimize cache size.
Add-Content -Path "$env:VCPKG_INSTALLATION_ROOT\triplets\x64-windows.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
Add-Content -Path "$env:VCPKG_INSTALLATION_ROOT\triplets\${{ matrix.conf.triplet }}.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
- name: Restore vcpkg binary cache
uses: actions/cache/restore@v4
id: vcpkg-binary-cache
with:
path: ~/AppData/Local/vcpkg/archives
key: ${{ matrix.conf.triplet }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
- name: Install Ccache
run: |
choco install --yes --no-progress ccache --version=$env:CI_CCACHE_VERSION
- name: Generate build system
run: |
cmake -B build --preset ${{ matrix.conf.preset }} -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DCCACHE_EXECUTABLE="$env:ChocolateyInstall\lib\ccache\tools\ccache-$env:CI_CCACHE_VERSION-windows-x86_64\ccache.exe" -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
- name: Save vcpkg binary cache
uses: actions/cache/save@v4
if: github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true'
with:
path: ~/AppData/Local/vcpkg/archives
key: ${{ matrix.conf.triplet }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}