Resolves #31071.
The CI run in my personal repo: https://github.com/hebasto/bitcoin/actions/runs/12140873955.
Resolves #31071.
The CI run in my personal repo: https://github.com/hebasto/bitcoin/actions/runs/12140873955.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31176.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
Concept ACK | davidgumberg |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Reviewers, this pull request conflicts with the following ones:
bitcoin-chainstate.exe
to bitcoinkernel.dll
on Windows by hebasto)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Concept ACK
#31172 @ https://github.com/bitcoin/bitcoin/pull/31172/commits/7dd0ee89a092c6ec4e305fbdb0cf3afa9e41cab6 passes CI but trivially fails to start on any Windows system because Wine lacks some undocumented Windows behavior.
267@@ -268,3 +268,62 @@ jobs:
268 path: ${{ env.CCACHE_DIR }}
269 # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
270 key: ${{ github.job }}-ccache-${{ github.run_id }}
271+
272+ windows-cross-build:
273+ runs-on: ubuntu-latest
274+ name: Cross-build to Windows
275+ container: debian:bookworm
Forgot to copy the comment?
0 container: debian:bookworm # Check that https://packages.debian.org/bookworm/g++-mingw-w64-x86-64-posix (version 12.2, similar to guix) can cross-compile
wine
from ci/test/00_setup_env_win64.sh
, or at least set RUN_UNIT_TESTS=false
.
279+ uses: actions/checkout@v4
280+
281+ - name: Install required packages
282+ run: |
283+ apt-get update
284+ apt-get install --no-install-recommends -y build-essential pkg-config curl ca-certificates ccache python3 cmake nsis g++-mingw-w64-x86-64-posix
284+ apt-get install --no-install-recommends -y build-essential pkg-config curl ca-certificates ccache python3 cmake nsis g++-mingw-w64-x86-64-posix
285+
286+ - name: Build depends
287+ working-directory: depends
288+ run: |
289+ make -j$(nproc) HOST=x86_64-w64-mingw32 LOG=1 NO_QT=1
Thanks for the POC!
Without caching I wonder how useful this is. However, caching may be the hardest part to get right.
Taking a step back, I wonder what was the last real issue found by Wine, which wasn’t found by the native Windows task? If there are none, or not too many, I think this could also be made a nightly CI task, only run on master after a merge (without caching), or in a completely separate repo. The same is done for other stuff, like the valgrind tasks, or the s390x tasks.
I’ll address your feedback once new actions are enabled.
Reworked. The GHA job now re-uses ci/test/00_setup_env_win64.sh
.
Added caching for depends/built
and Ccache.
11@@ -12,7 +12,8 @@ export HOST=x86_64-w64-mingw32
12 export DPKG_ADD_ARCH="i386"
13 export PACKAGES="nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file"
299+ run: |
300+ .\bench_bitcoin.exe -sanity-check -priority-level=high
301+
302+ - name: Run tests
303+ run: |
304+ .\test_bitcoin.exe
IIRC chmod does not work on Windows, so a workaround may be needed for the test failure.
Not sure about the wallet_migration.py
failure. Another workaround may be needed there.
Also, the wallet_migration
test won’t be running after #31248, so the previous releases tests should probably be run as well here.
(Functional tests could be handled in a follow-up, if you want)
The problematic tests have been disabled and documented.
This change is required for testing cross-built executables on Windows
natively.