Skip to content
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

ci: change windows CI to Focal, modify wrap_wine to use wine64 for 64bit binaries #2484

Merged
merged 2 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/test/00_setup_env_win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_win32
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to win32
export DOCKER_NAME_TAG=ubuntu:20.04 # Check that focal can cross-compile to win32
export HOST=i686-w64-mingw32
export PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32"
export PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt winehq-stable"
export RUN_UNIT_TESTS=true
export RUN_FUNCTIONAL_TESTS=false
# export RUN_SECURITY_TESTS="true"
Expand Down
5 changes: 3 additions & 2 deletions ci/test/00_setup_env_win64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_win64
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to win64
export DOCKER_NAME_TAG=ubuntu:20.04 # Check that focal can cross-compile to win64
export HOST=x86_64-w64-mingw32
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine-stable winehq-stable"
export DPKG_ADD_ARCH="i386"
export GOAL=""
export GRIDCOIN_CONFIG="--enable-reduce-exports --with-gui=qt5"
export NEED_XVFB="true"
8 changes: 8 additions & 0 deletions ci/test/04_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ if [[ $DOCKER_NAME_TAG == centos* ]]; then
END_FOLD
elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
BEGIN_FOLD apt
if [[ $HOST = *-mingw32 ]]; then
# Ubuntu 20.04's wine has a weird issue where wine and wineserver disagrees on the
# temporary directory. This block fetches the latest wine from WineHQ instead.
${CI_RETRY_EXE} DOCKER_EXEC apt-get update
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y ca-certificates gnupg curl
DOCKER_EXEC "curl -sS https://dl.winehq.org/wine-builds/winehq.key | apt-key add -"
DOCKER_EXEC "echo 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' >> /etc/apt/sources.list"
fi
${CI_RETRY_EXE} DOCKER_EXEC apt-get update
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES
if [ "$NEED_XVFB" == "true" ]; then
Expand Down
8 changes: 7 additions & 1 deletion ci/test/wrap-wine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@

export LC_ALL=C.UTF-8

wine --version

for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}.exe; do
# shellcheck disable=SC2044
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename $b_name)"); do
if (file "$b" | grep "Windows"); then
SUFFIX=
if (file "$b" | grep "x86-64"); then
SUFFIX=64
fi
echo "Wrap $b ..."
mv "$b" "${b}_orig"
echo '#!/usr/bin/env bash' > "$b"
echo "wine \"${b}_orig\" \"\$@\"" >> "$b"
echo "wine${SUFFIX} \"${b}_orig\" \"\$@\"" >> "$b"
chmod +x "$b"
fi
done
Expand Down