Skip to content

Commit 527219d

Browse files
authored
Merge pull request #224 from JaredTate/develop
Fix GUIX Build For Windows, Linux, Intel Mac
2 parents 476079d + 57a62e3 commit 527219d

File tree

4 files changed

+321
-443
lines changed

4 files changed

+321
-443
lines changed

.cirrus.yml

+47-134
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
env: # Global defaults
1+
### Global defaults
2+
3+
env:
24
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
3-
MAKEJOBS: "-j10"
5+
MAKEJOBS: "-j4"
46
TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
57
CCACHE_SIZE: "200M"
68
CCACHE_DIR: "/tmp/ccache_dir"
@@ -16,46 +18,56 @@ persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE
1618
persistent_worker: {} # https://cirrus-ci.org/guide/persistent-workers/
1719

1820
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
19-
filter_template: &FILTER_TEMPLATE
20-
skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
21-
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
22-
2321
base_template: &BASE_TEMPLATE
24-
<< : *FILTER_TEMPLATE
22+
skip: $CIRRUS_REPO_FULL_NAME == "digibyte-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
2523
merge_base_script:
26-
# Unconditionally install git (used in fingerprint_script) and set the
27-
# default git author name (used in verify-commits.py)
24+
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
2825
- bash -c "$PACKAGE_MANAGER_INSTALL git"
26+
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
2927
- git config --global user.email "[email protected]"
3028
- git config --global user.name "ci"
31-
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
32-
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
3329
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
30+
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
3431

35-
main_template: &MAIN_TEMPLATE
32+
global_task_template: &GLOBAL_TASK_TEMPLATE
33+
<< : *BASE_TEMPLATE
3634
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
3735
container:
3836
# https://cirrus-ci.org/faq/#are-there-any-limits
3937
# Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
4038
cpu: 2
41-
greedy: true
4239
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
4340
ccache_cache:
4441
folder: "/tmp/ccache_dir"
4542
depends_built_cache:
4643
folder: "depends/built"
47-
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-list -1 HEAD ./depends)
4844
ci_script:
4945
- ./ci/test_run_all.sh
5046

51-
global_task_template: &GLOBAL_TASK_TEMPLATE
52-
<< : *BASE_TEMPLATE
53-
<< : *MAIN_TEMPLATE
47+
depends_sdk_cache_template: &DEPENDS_SDK_CACHE_TEMPLATE
48+
depends_sdk_cache:
49+
folder: "depends/sdk-sources"
5450

5551
compute_credits_template: &CREDITS_TEMPLATE
5652
# https://cirrus-ci.org/pricing/#compute-credits
5753
# Only use credits for pull requests to the main repo
58-
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin' && $CIRRUS_PR != ""
54+
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'digibyte/digibyte' && $CIRRUS_PR != ""
55+
56+
#task:
57+
# name: "Windows"
58+
# windows_container:
59+
# image: cirrusci/windowsservercore:2019
60+
# env:
61+
# CIRRUS_SHELL: powershell
62+
# PATH: 'C:\Python37;C:\Python37\Scripts;%PATH%'
63+
# PYTHONUTF8: 1
64+
# QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip'
65+
# QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
66+
# QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
67+
# VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
68+
# VCPKG_COMMIT_ID: 'ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74'
69+
# install_script:
70+
# - choco install python --version=3.7.7 -y
5971

6072
task:
6173
name: 'lint [bionic]'
@@ -72,108 +84,13 @@ task:
7284
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
7385

7486
task:
75-
name: "Win64 native [msvc]"
76-
<< : *FILTER_TEMPLATE
77-
windows_container:
78-
cpu: 4
79-
memory: 8G
80-
image: cirrusci/windowsservercore:visualstudio2019
81-
timeout_in: 120m
82-
env:
83-
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;%PATH%'
84-
PYTHONUTF8: 1
85-
CI_VCPKG_TAG: '2021.05.12'
86-
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
87-
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
88-
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip'
89-
QT_LOCAL_PATH: 'C:\qt-everywhere-src-5.15.2.zip'
90-
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.2'
91-
QTBASEDIR: 'C:\Qt_static'
92-
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
93-
IgnoreWarnIntDirInTempDetected: 'true'
94-
merge_script:
95-
- git config --global user.email "[email protected]"
96-
- git config --global user.name "ci"
97-
# Windows filesystem loses the executable bit, and all of the executable
98-
# files are considered "modified" now. It will break the following `git merge`
99-
# command. The next two commands make git ignore this issue.
100-
- git config core.filemode false
101-
- git reset --hard
102-
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL $env:CIRRUS_BASE_BRANCH; git merge FETCH_HEAD; }
103-
msvc_qt_built_cache:
104-
folder: "%QTBASEDIR%"
105-
reupload_on_changes: false
106-
fingerprint_script:
107-
- echo %QT_DOWNLOAD_URL%
108-
- msbuild -version
109-
populate_script:
110-
- curl -L -o C:\jom.zip http://download.qt.io/official_releases/jom/jom.zip
111-
- mkdir C:\jom
112-
- tar -xf C:\jom.zip -C C:\jom
113-
- curl -L -o %QT_LOCAL_PATH% %QT_DOWNLOAD_URL%
114-
- tar -xf %QT_LOCAL_PATH% -C C:\
115-
- '%x64_NATIVE_TOOLS%'
116-
- cd %QT_SOURCE_DIR%
117-
- mkdir build
118-
- cd build
119-
- ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix %QTBASEDIR%
120-
- jom
121-
- jom install
122-
vcpkg_tools_cache:
123-
folder: '%VCPKG_DOWNLOADS%\tools'
124-
reupload_on_changes: false
125-
fingerprint_script:
126-
- echo %CI_VCPKG_TAG%
127-
- msbuild -version
128-
vcpkg_binary_cache:
129-
folder: '%VCPKG_DEFAULT_BINARY_CACHE%'
130-
reupload_on_changes: true
131-
fingerprint_script:
132-
- echo %CI_VCPKG_TAG%
133-
- msbuild -version
134-
populate_script:
135-
- mkdir %VCPKG_DEFAULT_BINARY_CACHE%
136-
install_python_script:
137-
- choco install --yes --no-progress python3 --version=3.9.6
138-
- pip install zmq
139-
- python -VV
140-
install_vcpkg_script:
141-
- cd ..
142-
- git clone --quiet https://github.com/microsoft/vcpkg.git
143-
- cd vcpkg
144-
- git -c advice.detachedHead=false checkout %CI_VCPKG_TAG%
145-
- .\bootstrap-vcpkg -disableMetrics
146-
- echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake
147-
- .\vcpkg integrate install
148-
- .\vcpkg version
149-
build_script:
150-
- cd %CIRRUS_WORKING_DIR%
151-
- python build_msvc\msvc-autogen.py
152-
- msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
153-
unit_tests_script:
154-
- src\test_bitcoin.exe -l test_suite
155-
- src\bench_bitcoin.exe > NUL
156-
- python test\util\test_runner.py
157-
- python test\util\rpcauth-test.py
158-
functional_tests_script:
159-
# Increase the dynamic port range to the maximum allowed value to mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted".
160-
# See: https://docs.microsoft.com/en-us/biztalk/technical-guides/settings-that-can-be-modified-to-improve-network-performance
161-
- netsh int ipv4 set dynamicport tcp start=1025 num=64511
162-
- netsh int ipv6 set dynamicport tcp start=1025 num=64511
163-
# Exclude feature_dbcrash for now due to timeout
164-
- python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=4000 --jobs=4 --timeout-factor=8 --extended --exclude feature_dbcrash
165-
166-
task:
167-
name: 'ARM [unit tests, no functional tests] [bullseye]'
87+
name: 'ARM [unit tests, no functional tests] [buster]'
16888
<< : *GLOBAL_TASK_TEMPLATE
169-
arm_container:
170-
image: debian:bullseye
171-
cpu: 2
172-
memory: 8G
89+
container:
90+
image: debian:buster
17391
env:
17492
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
17593
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
176-
QEMU_USER_CMD: "" # Disable qemu and run the test natively
17794

17895
task:
17996
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [focal]'
@@ -205,58 +122,58 @@ task:
205122
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh"
206123

207124
task:
208-
name: '[TSan, depends, gui] [jammy]'
125+
name: '[depends, sanitizers: thread (TSan), no gui] [hirsute]'
209126
<< : *GLOBAL_TASK_TEMPLATE
210127
container:
211-
image: ubuntu:jammy
128+
image: ubuntu:hirsute
212129
cpu: 6 # Increase CPU and Memory to avoid timeout
213130
memory: 24G
214131
env:
215132
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
133+
MAKEJOBS: "-j8"
216134
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
217135

218136
task:
219-
name: '[MSan, depends] [focal]'
137+
name: '[depends, sanitizers: memory (MSan)] [focal]'
220138
<< : *GLOBAL_TASK_TEMPLATE
221139
container:
222140
image: ubuntu:focal
223141
env:
224142
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
225143
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
226-
MAKEJOBS: "-j4" # Avoid excessive memory use due to MSan
227144

228145
task:
229-
name: '[ASan + LSan + UBSan + integer, no depends] [jammy]'
146+
name: '[no depends, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer] [hirsute]'
230147
<< : *GLOBAL_TASK_TEMPLATE
231148
container:
232-
image: ubuntu:jammy
149+
image: ubuntu:hirsute
233150
env:
234151
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
235152
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
236-
MAKEJOBS: "-j4" # Avoid excessive memory use
237153

238154
task:
239-
name: '[fuzzer,address,undefined,integer, no depends] [focal]'
240-
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BASE_BRANCH == $CIRRUS_DEFAULT_BRANCH
155+
name: '[no depends, sanitizers: fuzzer,address,undefined,integer] [focal]'
241156
<< : *GLOBAL_TASK_TEMPLATE
242157
container:
243158
image: ubuntu:focal
244159
cpu: 4 # Increase CPU and memory to avoid timeout
245160
memory: 16G
246161
env:
247162
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
163+
MAKEJOBS: "-j8"
248164
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
249165

250166
task:
251-
name: '[multiprocess, i686, DEBUG] [focal]'
167+
name: '[multiprocess, DEBUG] [focal]'
252168
<< : *GLOBAL_TASK_TEMPLATE
253169
container:
254170
image: ubuntu:focal
255171
cpu: 4
256172
memory: 16G # The default memory is sometimes just a bit too small, so double everything
257173
env:
258174
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
259-
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
175+
MAKEJOBS: "-j8"
176+
FILE_ENV: "./ci/test/00_setup_env_native_multiprocess.sh"
260177

261178
task:
262179
name: '[no wallet] [bionic]'
@@ -297,16 +214,12 @@ task:
297214

298215
task:
299216
name: 'ARM64 Android APK [focal]'
300-
<< : *BASE_TEMPLATE
301-
android_sdk_cache:
302-
folder: "depends/SDKs/android"
303-
fingerprint_key: "ANDROID_API_LEVEL=28 ANDROID_BUILD_TOOLS_VERSION=28.0.3 ANDROID_NDK_VERSION=23.1.7779620"
217+
<< : *DEPENDS_SDK_CACHE_TEMPLATE
304218
depends_sources_cache:
305219
folder: "depends/sources"
306-
fingerprint_script: git rev-list -1 HEAD ./depends
307-
<< : *MAIN_TEMPLATE
220+
<< : *GLOBAL_TASK_TEMPLATE
308221
container:
309222
image: ubuntu:focal
310223
env:
311224
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
312-
FILE_ENV: "./ci/test/00_setup_env_android.sh"
225+
FILE_ENV: "./ci/test/00_setup_env_android.sh"

0 commit comments

Comments
 (0)