mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Improve windows build (#921)
* fix windows build * exclude test-bigint execution on windows --------- Co-authored-by: My Name <my-name@chromium.org>
This commit is contained in:
parent
79a75d575e
commit
4969176ec9
2 changed files with 33 additions and 23 deletions
|
@ -182,7 +182,7 @@ pipeline {
|
||||||
timeout(time: 90, unit: 'MINUTES') {
|
timeout(time: 90, unit: 'MINUTES') {
|
||||||
bat '''
|
bat '''
|
||||||
copy assembly\\native\\build-windows.bat .
|
copy assembly\\native\\build-windows.bat .
|
||||||
build-windows.bat
|
build-windows.bat -t
|
||||||
'''
|
'''
|
||||||
bat '''
|
bat '''
|
||||||
cd artifacts
|
cd artifacts
|
||||||
|
|
|
@ -14,24 +14,26 @@ choco feature enable -n allowEmptyChecksums
|
||||||
|
|
||||||
echo Installing pkgconfiglite...
|
echo Installing pkgconfiglite...
|
||||||
choco install -y pkgconfiglite
|
choco install -y pkgconfiglite
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't install pkgconfiglite
|
echo Can't install pkgconfiglite
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
|
||||||
echo Installing ninja...
|
echo Installing ninja...
|
||||||
choco install -y ninja
|
choco install -y ninja
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't install ninja
|
echo Can't install ninja
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
|
||||||
if not exist "zlib" (
|
if not exist "zlib" (
|
||||||
git clone https://github.com/madler/zlib.git
|
git clone https://github.com/madler/zlib.git
|
||||||
cd zlib\contrib\vstudio\vc14
|
cd zlib
|
||||||
|
git checkout v1.3.1
|
||||||
|
cd contrib\vstudio\vc14
|
||||||
msbuild zlibstat.vcxproj /p:Configuration=ReleaseWithoutAsm /p:platform=x64 -p:PlatformToolset=v143
|
msbuild zlibstat.vcxproj /p:Configuration=ReleaseWithoutAsm /p:platform=x64 -p:PlatformToolset=v143
|
||||||
|
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't install zlib
|
echo Can't install zlib
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
@ -41,14 +43,20 @@ echo Using zlib...
|
||||||
)
|
)
|
||||||
|
|
||||||
if not exist "secp256k1" (
|
if not exist "secp256k1" (
|
||||||
git clone https://github.com/libbitcoin/secp256k1.git
|
git clone https://github.com/bitcoin-core/secp256k1.git
|
||||||
cd secp256k1\builds\msvc\vs2017
|
cd secp256k1
|
||||||
msbuild /p:Configuration=StaticRelease -p:PlatformToolset=v143 -p:Platform=x64
|
git checkout v0.3.2
|
||||||
IF errorlevel 1 (
|
cmake -G "Visual Studio 17 2022" -A x64 -S . -B build -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DBUILD_SHARED_LIBS=OFF
|
||||||
|
IF %errorlevel% NEQ 0 (
|
||||||
|
echo Can't configure secp256k1
|
||||||
|
exit /b %errorlevel%
|
||||||
|
)
|
||||||
|
cmake --build build --config Release
|
||||||
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't install secp256k1
|
echo Can't install secp256k1
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
cd ..\..\..\..
|
cd ..
|
||||||
) else (
|
) else (
|
||||||
echo Using secp256k1...
|
echo Using secp256k1...
|
||||||
)
|
)
|
||||||
|
@ -56,7 +64,7 @@ echo Using secp256k1...
|
||||||
|
|
||||||
if not exist "libsodium" (
|
if not exist "libsodium" (
|
||||||
curl -Lo libsodium-1.0.18-stable-msvc.zip https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable-msvc.zip
|
curl -Lo libsodium-1.0.18-stable-msvc.zip https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable-msvc.zip
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't download libsodium
|
echo Can't download libsodium
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
@ -67,7 +75,7 @@ echo Using libsodium...
|
||||||
|
|
||||||
if not exist "openssl-3.1.4" (
|
if not exist "openssl-3.1.4" (
|
||||||
curl -Lo openssl-3.1.4.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/openssl-3.1.4.zip
|
curl -Lo openssl-3.1.4.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/openssl-3.1.4.zip
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't download OpenSSL
|
echo Can't download OpenSSL
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
@ -78,7 +86,7 @@ echo Using openssl...
|
||||||
|
|
||||||
if not exist "libmicrohttpd-0.9.77-w32-bin" (
|
if not exist "libmicrohttpd-0.9.77-w32-bin" (
|
||||||
curl -Lo libmicrohttpd-0.9.77-w32-bin.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/libmicrohttpd-0.9.77-w32-bin.zip
|
curl -Lo libmicrohttpd-0.9.77-w32-bin.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/libmicrohttpd-0.9.77-w32-bin.zip
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't download libmicrohttpd
|
echo Can't download libmicrohttpd
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
@ -89,7 +97,7 @@ echo Using libmicrohttpd...
|
||||||
|
|
||||||
if not exist "readline-5.0-1-lib" (
|
if not exist "readline-5.0-1-lib" (
|
||||||
curl -Lo readline-5.0-1-lib.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/readline-5.0-1-lib.zip
|
curl -Lo readline-5.0-1-lib.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/readline-5.0-1-lib.zip
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't download readline
|
echo Can't download readline
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
@ -110,7 +118,7 @@ cmake -GNinja -DCMAKE_BUILD_TYPE=Release ^
|
||||||
-DSODIUM_USE_STATIC_LIBS=1 ^
|
-DSODIUM_USE_STATIC_LIBS=1 ^
|
||||||
-DSECP256K1_FOUND=1 ^
|
-DSECP256K1_FOUND=1 ^
|
||||||
-DSECP256K1_INCLUDE_DIR=%root%\secp256k1\include ^
|
-DSECP256K1_INCLUDE_DIR=%root%\secp256k1\include ^
|
||||||
-DSECP256K1_LIBRARY=%root%\secp256k1\bin\x64\Release\v143\static\secp256k1.lib ^
|
-DSECP256K1_LIBRARY=%root%\secp256k1\build\src\Release\libsecp256k1.lib ^
|
||||||
-DMHD_FOUND=1 ^
|
-DMHD_FOUND=1 ^
|
||||||
-DMHD_LIBRARY=%root%\libmicrohttpd-0.9.77-w32-bin\x86_64\VS2019\Release-static\libmicrohttpd.lib ^
|
-DMHD_LIBRARY=%root%\libmicrohttpd-0.9.77-w32-bin\x86_64\VS2019\Release-static\libmicrohttpd.lib ^
|
||||||
-DMHD_INCLUDE_DIR=%root%\libmicrohttpd-0.9.77-w32-bin\x86_64\VS2019\Release-static ^
|
-DMHD_INCLUDE_DIR=%root%\libmicrohttpd-0.9.77-w32-bin\x86_64\VS2019\Release-static ^
|
||||||
|
@ -118,10 +126,12 @@ cmake -GNinja -DCMAKE_BUILD_TYPE=Release ^
|
||||||
-DZLIB_INCLUDE_DIR=%root%\zlib ^
|
-DZLIB_INCLUDE_DIR=%root%\zlib ^
|
||||||
-DZLIB_LIBRARIES=%root%\zlib\contrib\vstudio\vc14\x64\ZlibStatReleaseWithoutAsm\zlibstat.lib ^
|
-DZLIB_LIBRARIES=%root%\zlib\contrib\vstudio\vc14\x64\ZlibStatReleaseWithoutAsm\zlibstat.lib ^
|
||||||
-DOPENSSL_FOUND=1 ^
|
-DOPENSSL_FOUND=1 ^
|
||||||
-DOPENSSL_INCLUDE_DIR=%root%/openssl-3.1.4/x64/include ^
|
-DOPENSSL_INCLUDE_DIR=%root%\openssl-3.1.4\x64\include ^
|
||||||
-DOPENSSL_CRYPTO_LIBRARY=%root%/openssl-3.1.4/x64/lib/libcrypto_static.lib ^
|
-DOPENSSL_CRYPTO_LIBRARY=%root%\openssl-3.1.4\x64\lib\libcrypto_static.lib ^
|
||||||
|
-DREADLINE_INCLUDE_DIR=%root%\readline-5.0-1-lib\include ^
|
||||||
|
-DREADLINE_LIBRARY=%root%\readline-5.0-1-lib\lib\readline.lib ^
|
||||||
-DCMAKE_CXX_FLAGS="/DTD_WINDOWS=1 /EHsc /bigobj" ..
|
-DCMAKE_CXX_FLAGS="/DTD_WINDOWS=1 /EHsc /bigobj" ..
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't configure TON
|
echo Can't configure TON
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
@ -133,7 +143,7 @@ json2tlo dht-server http-proxy rldp-http-proxy adnl-proxy create-state create-ha
|
||||||
test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont test-net ^
|
test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont test-net ^
|
||||||
test-tdactor test-tdutils test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain ^
|
test-tdactor test-tdutils test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain ^
|
||||||
test-fec test-tddb test-db test-validator-session-state
|
test-fec test-tddb test-db test-validator-session-state
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't compile TON
|
echo Can't compile TON
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
@ -141,14 +151,14 @@ IF errorlevel 1 (
|
||||||
ninja storage-daemon storage-daemon-cli blockchain-explorer fift func tonlib tonlibjson ^
|
ninja storage-daemon storage-daemon-cli blockchain-explorer fift func tonlib tonlibjson ^
|
||||||
tonlib-cli validator-engine lite-client pow-miner validator-engine-console generate-random-id ^
|
tonlib-cli validator-engine lite-client pow-miner validator-engine-console generate-random-id ^
|
||||||
json2tlo dht-server http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork emulator
|
json2tlo dht-server http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork emulator
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Can't compile TON
|
echo Can't compile TON
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
copy validator-engine\validator-engine.exe test
|
copy validator-engine\validator-engine.exe test
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo validator-engine.exe does not exist
|
echo validator-engine.exe does not exist
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
@ -156,8 +166,8 @@ IF errorlevel 1 (
|
||||||
IF "%1"=="-t" (
|
IF "%1"=="-t" (
|
||||||
echo Running tests...
|
echo Running tests...
|
||||||
REM ctest -C Release --output-on-failure -E "test-catchain|test-actors|test-validator-session-state"
|
REM ctest -C Release --output-on-failure -E "test-catchain|test-actors|test-validator-session-state"
|
||||||
ctest -C Release --output-on-failure --timeout 1800
|
ctest -C Release --output-on-failure -E "test-bigint" --timeout 1800
|
||||||
IF errorlevel 1 (
|
IF %errorlevel% NEQ 0 (
|
||||||
echo Some tests failed
|
echo Some tests failed
|
||||||
exit /b %errorlevel%
|
exit /b %errorlevel%
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue