Merge pull request #781 from Performance Network branch #195
This file contains 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
name: Windows Server 2019 x64 Compile | |
on: [push,workflow_dispatch,workflow_call] | |
defaults: | |
run: | |
shell: cmd | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- name: Get Current OS version | |
run: | | |
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" | |
- name: Check out current repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Check out zlib repository | |
uses: actions/checkout@v3 | |
with: | |
repository: desktop-app/zlib | |
path: zlib | |
- name: Setup msbuild.exe | |
uses: microsoft/[email protected] | |
- name: Install Pkg-config Lite | |
run: choco install pkgconfiglite | |
- name: Compile zlib Win64 | |
run: | | |
cd zlib\contrib\vstudio\vc14 | |
msbuild zlibstat.vcxproj /p:Configuration=ReleaseWithoutAsm /p:platform=x64 -p:PlatformToolset=v142 | |
- name: Compile secp256k1 Win64 | |
run: | | |
git clone https://github.com/libbitcoin/secp256k1.git | |
cd secp256k1\builds\msvc\vs2017 | |
msbuild /p:Configuration=StaticRelease -p:PlatformToolset=v142 -p:Platform=x64 | |
- name: Install pre-compiled libsodium Win64 | |
run: | | |
curl -Lo libsodium-1.0.18-stable-msvc.zip https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable-msvc.zip | |
unzip libsodium-1.0.18-stable-msvc.zip | |
- name: Install pre-compiled OpenSSL Win64 | |
run: | | |
curl -Lo openssl-1.1.1j.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/openssl-1.1.1j.zip | |
jar xf openssl-1.1.1j.zip | |
- name: Install pre-compiled libmicrohttpd Win64 | |
run: | | |
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 | |
unzip libmicrohttpd-0.9.77-w32-bin.zip | |
- name: Install pre-compiled Readline Win64 | |
run: | | |
curl -Lo readline-5.0-1-lib.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/readline-5.0-1-lib.zip | |
unzip readline-5.0-1-lib.zip | |
- name: Compile | |
run: | | |
set root=%cd% | |
set SODIUM_DIR=%root%\libsodium | |
echo %root% | |
echo %SODIUM_DIR% | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DSODIUM_USE_STATIC_LIBS=1 -DSECP256K1_INCLUDE_DIR=%root%\secp256k1\include -DSECP256K1_LIBRARY=%root%\secp256k1\bin\x64\Release\v142\static\secp256k1.lib -DREADLINE_INCLUDE_DIR=%root%\readline-5.0-1-lib\include\readline -DREADLINE_LIBRARY=%root%\readline-5.0-1-lib\lib\readline.lib -DPORTABLE=1 -DZLIB_FOUND=1 -DMHD_FOUND=1 -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 -DZLIB_INCLUDE_DIR=%root%\zlib -DZLIB_LIBRARY=%root%\zlib\contrib\vstudio\vc14\x64\ZlibStatReleaseWithoutAsm\zlibstat.lib -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=%root%/openssl-1.1.1j/include -DOPENSSL_CRYPTO_LIBRARY=%root%/openssl-1.1.1j/lib/libcrypto_static.lib -DCMAKE_CXX_FLAGS="/DTD_WINDOWS=1 /EHsc /bigobj /W0" .. | |
cmake --build . --target 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 json2tlo dht-server http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork emulator proxy-liteserver --config Release | |
- name: Show executables | |
run: | | |
cd build | |
del Release\test-* | |
dir *.exe /a-D /S /B | |
dir *.dll /a-D /S /B | |
- name: Check if validator-engine.exe exists | |
run: | | |
copy %cd%\build\validator-engine\Release\validator-engine.exe test | |
- name: Find & copy binaries | |
run: | | |
mkdir artifacts | |
mkdir artifacts\smartcont | |
mkdir artifacts\lib | |
for %%I in (build\storage\storage-daemon\Release\storage-daemon.exe build\storage\storage-daemon\Release\storage-daemon-cli.exe build\blockchain-explorer\blockchain-explorer.exe build\crypto\Release\fift.exe build\crypto\Release\tlbc.exe build\crypto\Release\func.exe build\crypto\Release\create-state.exe build\validator-engine-console\Release\validator-engine-console.exe build\tonlib\Release\tonlib-cli.exe build\tonlib\Release\tonlibjson.dll build\http\Release\http-proxy.exe build\rldp-http-proxy\Release\rldp-http-proxy.exe build\dht-server\Release\dht-server.exe build\lite-client\Release\lite-client.exe build\validator-engine\Release\validator-engine.exe build\utils\Release\generate-random-id.exe build\utils\Release\json2tlo.exe build\adnl\Release\adnl-proxy.exe build\emulator\Release\emulator.dll build\utils\proxy-liteserver.exe) do copy %%I artifacts\ | |
xcopy /e /k /h /i crypto\smartcont artifacts\smartcont | |
xcopy /e /k /h /i crypto\fift\lib artifacts\lib | |
- name: Upload artifacts | |
uses: actions/upload-artifact@master | |
with: | |
name: ton-win-binaries | |
path: artifacts |