name: C/C++ CI Windows Server 2019 x64 Compile on: workflow_dispatch: push: branches: - 'master' 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@v2 with: submodules: 'recursive' - name: Check out zlib repository uses: actions/checkout@v2 with: repository: desktop-app/zlib path: zlib - name: Setup msbuild.exe uses: microsoft/setup-msbuild@v1.0.2 - name: Compile zlib Win64 run: | cd zlib\contrib\vstudio\vc14 msbuild zlibstat.vcxproj /p:Configuration=ReleaseWithoutAsm /p:platform=x64 -p:PlatformToolset=v142 - name: Install pre-compiled OpenSSL Win64 run: | curl -Lo openssl-1.1.1o.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/openssl-1.1.1o.zip jar xf openssl-1.1.1o.zip - name: Configure run: | set root=%cd% echo %root% mkdir build cd build cmake -DZLIB_FOUND=1 -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/x64/include -DOPENSSL_CRYPTO_LIBRARY=%root%/openssl-1.1/x64/lib/libcrypto.lib -DCMAKE_CXX_FLAGS="/DTD_WINDOWS=1 /EHsc /bigobj /W0" .. - name: Build run: | cd build cmake --build . --target 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 --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: | set root=%cd% copy %root%\build\validator-engine\Release\validator-engine.exe test - name: Find & copy binaries run: | mkdir artifacts for /f %%a in ('dir *.exe /b /a /s') do copy /Y %%a artifacts copy build\tonlib\Release\tonlibjson.dll artifacts - name: Upload artifacts uses: actions/upload-artifact@master with: name: ton-win64-binaries path: artifacts