Skip to content

Commit 77777c8

Browse files
author
MarcoFalke
committed
ci: Run windows ci config on cirrus
1 parent 3333d69 commit 77777c8

File tree

6 files changed

+39
-9
lines changed

6 files changed

+39
-9
lines changed

.cirrus.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ task:
6161
env:
6262
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
6363

64+
task:
65+
name: 'Win64 [GOAL: deploy] [unit tests, no gui, no boost::process, no functional tests]'
66+
<< : *GLOBAL_TASK_TEMPLATE
67+
container:
68+
image: ubuntu:bionic
69+
env:
70+
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
71+
6472
task:
6573
name: 'x86_64 Linux [GOAL: install] [bionic] [C++17, previous releases, uses qt5 dev package and some depends packages] [unsigned char]'
6674
<< : *GLOBAL_TASK_TEMPLATE

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ jobs:
6565
script:
6666
- set -o errexit; source ./ci/lint/06_script.sh
6767

68-
- stage: test
69-
name: 'Win64 [GOAL: deploy] [unit tests, no gui, no boost::process, no functional tests]'
70-
env: >-
71-
FILE_ENV="./ci/test/00_setup_env_win64.sh"
72-
7368
- stage: test
7469
name: '32-bit + dash [GOAL: install] [CentOS 7] [gui]'
7570
env: >-

ci/test/00_setup_env_win64.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
99
export CONTAINER_NAME=ci_win64
1010
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to win64 (bionic is used in the gitian build as well)
1111
export HOST=x86_64-w64-mingw32
12-
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
12+
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64 file"
1313
export RUN_FUNCTIONAL_TESTS=false
1414
export RUN_SECURITY_TESTS="true"
1515
export GOAL="deploy"

ci/test/04_install.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/l
2626
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan"
2727
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
2828
env | grep -E '^(BITCOIN_CONFIG|BASE_|QEMU_|CCACHE_|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|PREVIOUS_RELEASES_DIR)' | tee /tmp/env
29-
if [[ $HOST = *-mingw32 ]]; then
30-
DOCKER_ADMIN="--cap-add SYS_ADMIN"
31-
elif [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
29+
if [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
3230
DOCKER_ADMIN="--cap-add SYS_PTRACE"
3331
fi
3432

ci/test/06_script_b.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66

77
export LC_ALL=C.UTF-8
88

9+
if [[ $HOST = *-mingw32 ]]; then
10+
BEGIN_FOLD wrap-wine
11+
# Generate all binaries, so that they can be wrapped
12+
DOCKER_EXEC make $MAKEJOBS -C src/secp256k1 VERBOSE=1
13+
DOCKER_EXEC make $MAKEJOBS -C src/univalue VERBOSE=1
14+
DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
15+
END_FOLD
16+
fi
17+
918
if [ -n "$QEMU_USER_CMD" ]; then
1019
BEGIN_FOLD wrap-qemu
1120
# Generate all binaries, so that they can be wrapped

ci/test/wrap-wine.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2020 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C.UTF-8
8+
9+
for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}.exe; do
10+
# shellcheck disable=SC2044
11+
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename $b_name)"); do
12+
if (file "$b" | grep "Windows"); then
13+
echo "Wrap $b ..."
14+
mv "$b" "${b}_orig"
15+
echo '#!/usr/bin/env bash' > "$b"
16+
echo "wine64 \"${b}_orig\" \"\$@\"" >> "$b"
17+
chmod +x "$b"
18+
fi
19+
done
20+
done

0 commit comments

Comments
 (0)