-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ci: fix Windows build in release.yml
#16280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e0e1547
ci: install `mingw-w64` for `x86_64-pc-windows-gnu` target
shekhirin 5105df5
revertme: comment `Move binary` step
shekhirin 497ab83
ci: run `release.yml` on `pull_request`
shekhirin f4176d3
ci: build for `x86-64-pc-windows-msvc` in `release.yml`
shekhirin cefb5a2
Revert "ci: build for `x86-64-pc-windows-msvc` in `release.yml`"
shekhirin 68432ec
fix(libmdbx): do not use `gnu_printf` in `mdbx.h`
shekhirin 95a2516
Revert "fix(libmdbx): do not use `gnu_printf` in `mdbx.h`"
shekhirin 3793569
fix(libmdbx): replace gnu `printf` with just `printf`
shekhirin 72a4916
ci: install latest `mingw-w64` for
shekhirin 4226603
Revert "fix(libmdbx): replace gnu `printf` with just `printf`"
shekhirin bf0f38c
revert mingw64 install as a step
shekhirin 648e67e
just copy commands from image
shekhirin 19e4161
add clang pre-build
shekhirin f11b597
ci: custom Dockerfile for windows
shekhirin ff32f0f
fix wine
shekhirin 4a75b12
fix clang apt get
shekhirin f9e8ee8
uncomment other images, some Dockerfile fixes
shekhirin 899dbff
uncomment stuff in release.yml
shekhirin 9810d9a
ci: add link to cross's Dockerfile in docs
shekhirin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| FROM ubuntu:24.04 AS cross-base | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates | ||
|
|
||
| RUN git clone https://github.com/cross-rs/cross /cross | ||
| WORKDIR /cross/docker | ||
| RUN git checkout 9e2298e17170655342d3248a9c8ac37ef92ba38f | ||
|
|
||
| RUN cp common.sh lib.sh / && /common.sh | ||
| RUN cp cmake.sh / && /cmake.sh | ||
| RUN cp xargo.sh / && /xargo.sh | ||
|
|
||
| FROM cross-base AS build | ||
|
|
||
| RUN apt-get install --assume-yes --no-install-recommends libz-mingw-w64-dev g++-mingw-w64-x86-64 gfortran-mingw-w64-x86-64 | ||
|
|
||
| RUN dpkg --add-architecture i386 && \ | ||
| apt-get install --assume-yes --no-install-recommends wget gpg && \ | ||
| mkdir -pm755 /etc/apt/keyrings && wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - && \ | ||
| wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources && \ | ||
| apt-get update && apt-get install --assume-yes --install-recommends winehq-stable | ||
|
|
||
| # run-detectors are responsible for calling the correct interpreter for exe | ||
| # files. For some reason it does not work inside a docker container (it works | ||
| # fine in the host). So we replace the usual paths of run-detectors to run wine | ||
| # directly. This only affects the guest, we are not messing up with the host. | ||
| # | ||
| # See /usr/share/doc/binfmt-support/detectors | ||
| RUN mkdir -p /usr/lib/binfmt-support/ && \ | ||
| rm -f /usr/lib/binfmt-support/run-detectors /usr/bin/run-detectors && \ | ||
| ln -s /usr/bin/wine /usr/lib/binfmt-support/run-detectors && \ | ||
| ln -s /usr/bin/wine /usr/bin/run-detectors | ||
|
|
||
| RUN cp windows-entry.sh / | ||
| ENTRYPOINT ["/windows-entry.sh"] | ||
|
|
||
| RUN cp toolchain.cmake /opt/toolchain.cmake | ||
|
|
||
| # for why we always link with pthread support, see: | ||
| # https://github.com/cross-rs/cross/pull/1123#issuecomment-1312287148 | ||
| ENV CROSS_TOOLCHAIN_PREFIX=x86_64-w64-mingw32- | ||
| ENV CROSS_TOOLCHAIN_SUFFIX=-posix | ||
| ENV CROSS_SYSROOT=/usr/x86_64-w64-mingw32 | ||
| ENV CROSS_TARGET_RUNNER="env -u CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER wine" | ||
| ENV CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc"$CROSS_TOOLCHAIN_SUFFIX" \ | ||
| CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER="$CROSS_TARGET_RUNNER" \ | ||
| AR_x86_64_pc_windows_gnu="$CROSS_TOOLCHAIN_PREFIX"ar \ | ||
| CC_x86_64_pc_windows_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc"$CROSS_TOOLCHAIN_SUFFIX" \ | ||
| CXX_x86_64_pc_windows_gnu="$CROSS_TOOLCHAIN_PREFIX"g++"$CROSS_TOOLCHAIN_SUFFIX" \ | ||
| CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_gnu=/opt/toolchain.cmake \ | ||
| BINDGEN_EXTRA_CLANG_ARGS_x86_64_pc_windows_gnu="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \ | ||
| CROSS_CMAKE_SYSTEM_NAME=Windows \ | ||
| CROSS_CMAKE_SYSTEM_PROCESSOR=AMD64 \ | ||
| CROSS_CMAKE_CRT=gnu \ | ||
| CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -m64" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.