diff --git a/.github/workflows/ccpp-linux.yml b/.github/workflows/ccpp-linux.yml new file mode 100644 index 00000000..39f5f275 --- /dev/null +++ b/.github/workflows/ccpp-linux.yml @@ -0,0 +1,46 @@ +name: C/C++ CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v2 + with: + depth: 1 + submodules: 'recursive' + - name: Run Cppcheck + uses: Bedzior/run-cppcheck@master + with: + enabled checks: all + enable inconclusive: true + generate report: true + - name: Upload report + uses: actions/upload-artifact@v1 + with: + name: report + path: output + - name: mkdir + run: | + mkdir build + - name: cmake + run: | + cd build + cmake .. + - name: make -j4 + run: | + cd build + make -j4 + - name: find & copy binaries + run: | + mkdir artifacts + cp --parents build/crypto/fift build/crypto/adjust-block build/crypto/dump-block build/crypto/tlbc build/crypto/func build/crypto/create-state build/validator-engine-console/validator-engine-console build/tonlib/tonlib-cli build/tonlib/libtonlibjson.so.0.5 build/tddb/io-bench build/http/http-proxy build/tdnet/udp_ping_pong build/tdnet/tcp_ping_pong build/rldp-http-proxy/rldp-http-proxy build/dht-server/dht-server build/lite-client/lite-client build/validator-engine/validator-engine build/utils/generate-random-id build/utils/pack-viewer build/utils/json2tlo build/adnl/adnl-proxy build/adnl/adnl-pong artifacts + - name: Upload artifacts + uses: actions/upload-artifact@master + with: + name: ton-binaries + path: artifacts diff --git a/.github/workflows/ccpp-win64.yml b/.github/workflows/ccpp-win64.yml new file mode 100644 index 00000000..4a829a6f --- /dev/null +++ b/.github/workflows/ccpp-win64.yml @@ -0,0 +1,77 @@ +name: C/C++ CI Win64 Compile + +on: [push] + +defaults: + run: + shell: cmd + +jobs: + build: + + runs-on: windows-latest + + 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=Debug /p:platform=x64 + msbuild zlibstat.vcxproj /p:Configuration=ReleaseWithoutAsm /p:platform=x64 + + - name: Install OpenSSL Win64 + run: | + curl -o openssl.msi https://slproweb.com/download/Win64OpenSSL-1_1_1i.msi + msiexec /i openssl.msi /quiet /qn /norestart + + - name: Build ton + 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 -DCMAKE_CXX_FLAGS="/DTD_WINDOWS=1 /EHsc /bigobj /W0" -DCMAKE_BUILD_TYPE=Release .. + + - name: Compile ton + run: | + cd build + cmake --build . + continue-on-error: true + + - name: Show executables + run: | + cd build + dir *.exe /a-D /S /B + + - name: Check if validator-engine.exe exists + run: | + set root=%cd% + copy %root%\build\validator-engine\Debug\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 + + - name: Upload artifacts + uses: actions/upload-artifact@master + with: + name: ton-win64-binaries + path: artifacts diff --git a/lite-client/lite-client.cpp b/lite-client/lite-client.cpp index bf30e1e8..1f438978 100644 --- a/lite-client/lite-client.cpp +++ b/lite-client/lite-client.cpp @@ -3461,7 +3461,7 @@ bool TestNode::ValidatorLoadInfo::store_record(const td::Bits256& key, const blo if (it == vset_map.end()) { return false; } - created.at(it->second) = std::make_pair(mc_cnt.total, shard_cnt.total); + created.at(it->second) = std::make_pair(mc_cnt.total, shard_cnt.total); return true; } diff --git a/tdutils/td/utils/port/Stat.cpp b/tdutils/td/utils/port/Stat.cpp index abe997c3..00e63438 100644 --- a/tdutils/td/utils/port/Stat.cpp +++ b/tdutils/td/utils/port/Stat.cpp @@ -58,6 +58,8 @@ #define PSAPI_VERSION 1 #endif #include +#pragma comment( lib, "psapi.lib" ) + #endif diff --git a/validator/manager.cpp b/validator/manager.cpp index d1a3984a..3abea6e8 100644 --- a/validator/manager.cpp +++ b/validator/manager.cpp @@ -1692,7 +1692,7 @@ void ValidatorManagerImpl::update_shards() { auto exp_vec = last_masterchain_state_->get_shards(); auto config = last_masterchain_state_->get_consensus_config(); validatorsession::ValidatorSessionOptions opts{config}; - uint threshold = 9407194; + td::uint32 threshold = 9407194; bool force_group_id_upgrade = last_masterchain_seqno_ == threshold; auto legacy_opts_hash = opts.get_hash(); if(last_masterchain_seqno_ >= threshold) { //TODO move to get_consensus_config()