From 4444808dd3a704ec0f5d97e2c736cc917656c491 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 4 Feb 2026 10:14:32 +0100 Subject: [PATCH] ci: [refactor] Add .github/ci-windows.py build step Note, the use of process_cpu_count() is intentional. It was only added in Python 3.13, according to https://docs.python.org/3/library/os.html#os.process_cpu_count . However, Python 3.13 is also the minimum required version on Windows, according to https://github.com/bitcoin/bitcoin/issues/29897#issuecomment-2940318094 to avoid intermittent test failures. --- .github/ci-windows.py | 17 ++++++++++++++++- .github/workflows/ci.yml | 3 +-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/ci-windows.py b/.github/ci-windows.py index 142fee7bac2..5d28ed0b855 100755 --- a/.github/ci-windows.py +++ b/.github/ci-windows.py @@ -56,15 +56,30 @@ def generate(ci_type): run(command) +def build(): + command = [ + "cmake", + "--build", + "build", + "-j", + str(os.process_cpu_count()), + "--config", + "Release", + ] + run(command) + + def main(): parser = argparse.ArgumentParser(description="Utility to run Windows CI steps.") parser.add_argument("ci_type", choices=GENERATE_OPTIONS, help="CI type to run.") - steps = ["generate"] + steps = ["generate", "build"] parser.add_argument("step", choices=steps, help="CI step to perform.") args = parser.parse_args() if args.step == "generate": generate(args.ci_type) + elif args.step == "build": + build() if __name__ == "__main__": diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f293b06e53e..75590d1d926 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -280,9 +280,8 @@ jobs: key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }} - name: Build - working-directory: build run: | - cmake --build . -j $NUMBER_OF_PROCESSORS --config Release + py -3 .github/ci-windows.py ${{ matrix.job-type }} build - name: Check executable manifests if: matrix.job-type == 'standard'