mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 18:22:57 +02:00
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.
This commit is contained in:
17
.github/ci-windows.py
vendored
17
.github/ci-windows.py
vendored
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user