ci: [refactor] Move pyzmq install and get_previous_releases into ci-windows-cross.py
What changed, and why it matters
This commit is a pure internal cleanup of Bitcoin Core's continuous integration (CI) scripts for Windows builds. It moves two steps—downloading previous Bitcoin releases and installing a Python library called pyzmq—into a single Python helper script. There is no change to the Bitcoin software that users run, no change to wallets, networking, consensus rules, or cryptography, and no security-relevant behavior is introduced.
No security action required. Treat as routine CI maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff refactors .github/ci-windows-cross.py and .github/workflows/ci.yml. It adds import os, constructs PREVIOUS_RELEASES_DIR from an environment variable, invokes test/get_previous_releases.py, and installs pyzmq via pip inside prepare_tests(). The workflow YAML removes the separate ‘Get previous releases’ and ‘pyzmq install’ steps and replaces them with a single ‘Prepare Windows test environment’ step that calls the Python script. Functionality is identical; only CI orchestration is consolidated.
Changed components
.github/ci-windows-cross.py.github/workflows/ci.ymlInspect captured patch +13 / −6
diff --git a/.github/ci-windows-cross.py b/.github/ci-windows-cross.py
index bacaffa0..84be2ed1 100755
--- a/.github/ci-windows-cross.py
+++ b/.github/ci-windows-cross.py
@@ -4,6 +4,7 @@
# file COPYING or https://opensource.org/license/mit/.
import argparse
+import os
import shlex
import subprocess
import sys
@@ -70,6 +71,15 @@ def prepare_tests():
content = "\n".join(lines) + "\n"
config_path.write_text(content)
print(content)
+ previous_releases_dir = Path(os.environ["PREVIOUS_RELEASES_DIR"])
+ cmd_download_prev_rel = [
+ sys.executable,
+ str(workspace / "test" / "get_previous_releases.py"),
+ "--target-dir",
+ str(previous_releases_dir),
+ ]
+ run(cmd_download_prev_rel)
+ run([sys.executable, "-m", "pip", "install", "pyzmq"])
def main():
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dff90ff8..210bccc2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -425,21 +425,18 @@ jobs:
./src/univalue/object.exe
./src/univalue/unitester.exe
- - name: Adjust paths in test/config.ini
- run: py -3 .github/ci-windows-cross.py prepare_tests
-
- name: Set previous release directory
run: |
echo "PREVIOUS_RELEASES_DIR=${{ runner.temp }}/previous_releases" >> "$GITHUB_ENV"
- - name: Get previous releases
- run: ./test/get_previous_releases.py --target-dir $PREVIOUS_RELEASES_DIR
+ - name: Prepare Windows test environment
+ run: |
+ py -3 .github/ci-windows-cross.py prepare_tests
- name: Run functional tests
env:
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
run: |
- py -3 -m pip install pyzmq
py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --quiet --tmpdirprefix="$RUNNER_TEMP" --combinedlogslen=99999999 --timeout-factor=$TEST_RUNNER_TIMEOUT_FACTOR $TEST_RUNNER_EXTRA \
`# feature_unsupported_utxo_db.py fails on Windows because of emojis in the test data directory.` \
--exclude feature_unsupported_utxo_db.py \
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.