mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Improve TON build scripts and some tests (#855)
* fix macOS github actions * fix android tonlib GH action; * fixing wasm GH action * strip binaries * fix randomly failing ubuntu and wasm GH actions * fix randomly failing ubuntu and wasm GH actions * revert some changes * adding more nix scripts and automated native build scripts; debug static ton compilation * minor fix * do not use pkg_config if path specified * move wasm script, run with sudo action script * weird, fixing - cp: missing destination file operand after 'assembly/native/build-ubuntu-20.04-shared.sh' * weird, fixing - cp: missing destination file operand after 'assembly/native/build-ubuntu-20.04-shared.sh' * ok * some adjustments for android and win builds * some adjustments for android and win builds * moving stripping inside the build script * access rights handling; adding simple binaries' tests * make lite-client-common, fift-lib and smc-envelope deliberately static; add -a (artifacts) flag to build scripts; * minor wasm build fix; create separate tonlib android build script; remove outdated __has_trivial_copy(T) * add windows build - WIP * adjust android build; improve win build; * adjust sodium paths for android build; use proper compiler for windows build; * add github windows build auxiliary file * adjust wasm build * add portable ubuntu build * exclude some unstable tests for some time * compile portable binaries on ubuntu-20.04 * exclude some unstable tests * include static gsl * restart builds * restart builds * restart builds * remove libreadline, gsl and blas dependencies in linux build * add macos build script * install missing autoconf in macos builds * enable all tests and see what fails * enable win tests and restart others * enable win tests and fix test-smartcont.cpp * enable win tests * use clang-16 on mac builds, add blockchain-explorer for ubuntu builds, add portable macos build * move sudo part outside a build scripts * move sudo part outside a build scripts * run llvm install with sudo * remove libgnutls28-dev before ubuntu static compilation, include blockchain-explorer into artifacts; remove warning: definition of implicit copy constructor for 'Stat' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy] * rework wrong decision, put back system gnutls, but compile libmicrohttpd with --disable-https * add jenkins pipeline sceleton * WIP jenkins pipeline sceleton * WIP jenkins pipeline changes * WIP jenkins pipeline: add stage timout, zip and group artifacts * WIP jenkins pipeline: macos portable build fix * WIP jenkins pipeline: wording * WIP jenkins pipeline: add android tonlib * WIP jenkins pipeline: add was binaries * WIP jenkins pipeline: add TOTAL_MEMORY 1.5gb to funcfiftlib wasm linking * WIP jenkins pipeline: add nix build on linux aarch64 * WIP jenkins pipeline: funcfiftlib compilation fails that 16mb mem is not enough, increase to 32mb * WIP jenkins pipeline: enable test in nix build * WIP jenkins pipeline: add linux x86-64 nix build * WIP jenkins pipeline: include libs in nix build * WIP jenkins pipeline: include libs in nix build * WIP jenkins pipeline: include mac nix build * WIP jenkins pipeline: include mac nix build * WIP jenkins pipeline: include mac nix build * WIP jenkins pipeline: include mac nix build * WIP jenkins pipeline: include mac nix build * WIP jenkins pipeline: include mac nix build * WIP jenkins pipeline: nix linux arm64 with openssl 1.1 for now * WIP jenkins pipeline: working ubuntu arm64 libtonjson * WIP jenkins pipeline: working ubuntu arm64 libtonjson + minor fix * WIP jenkins pipeline: working ubuntu arm64 libtonjson + minor fix 2 * WIP jenkins pipeline: merry christmas * WIP jenkins pipeline: merry christmas 2 * WIP jenkins pipeline: remove native static builds * WIP jenkins pipeline: enable more tests * WIP jenkins pipeline: zip artifacts better * WIP jenkins pipeline: get rid of path in the final zip * WIP jenkins pipeline: minor fix, include lib and smartcont folders * WIP jenkins pipeline: minor fix, include lib and smartcont folders into nix artifacts also * WIP jenkins pipeline: minor fix * WIP jenkins pipeline: minor fix * adjust github actions for new nix builds * cleanup * cleanup * cleanup * cleanup * rename libtonlibjson.so.0.5 to libtonlibjson.so * Add TON build instructions to README.md * simplify * fix test-tonlib-offline * set timeout per test of 300 sec * set timeout per test of 600 sec for non nix builds * increase test timeout to 900 sec; minor changes * use MS VS 2022 for win TON compilation; update README.md * use MS VS 2022 for win TON compilation; update README.md * change path to MSVC in github workflow * change path to MSVC in groovy pipeline * compile ton on win, with msvc 2022 community and enterprise versions * minor fixes * improve network tests * remove TON compilation against macos-11 github runner * add `choco feature enable -n allowEmptyChecksums` since pkg-config-lite-0.28-1 does not have a checksum * abort win compilation if 3pp can't be downloaded * increase test timeout to 30 min * improving test-catchain
This commit is contained in:
parent
388c8a6d86
commit
e0a320f715
62 changed files with 2019 additions and 831 deletions
122
.github/script/fift-func-wasm-build-ubuntu.sh
vendored
122
.github/script/fift-func-wasm-build-ubuntu.sh
vendored
|
@ -1,122 +0,0 @@
|
|||
# The script builds funcfift compiler to WASM
|
||||
|
||||
# dependencies:
|
||||
#sudo apt-get install -y build-essential git make cmake clang libgflags-dev zlib1g-dev libssl-dev libreadline-dev libmicrohttpd-dev pkg-config libgsl-dev python3 python3-dev python3-pip nodejs libevent-dev
|
||||
|
||||
export CC=$(which clang-16)
|
||||
export CXX=$(which clang++-16)
|
||||
export CCACHE_DISABLE=1
|
||||
|
||||
cd ../..
|
||||
rm -rf openssl zlib emsdk secp256k1 libsodium build
|
||||
echo `pwd`
|
||||
|
||||
git clone https://github.com/openssl/openssl.git
|
||||
cd openssl
|
||||
git checkout checkout openssl-3.1.4
|
||||
./config
|
||||
make -j16
|
||||
OPENSSL_DIR=`pwd`
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/madler/zlib.git
|
||||
cd zlib
|
||||
ZLIB_DIR=`pwd`
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/bitcoin-core/secp256k1.git
|
||||
cd secp256k1
|
||||
./autogen.sh
|
||||
SECP256K1_DIR=`pwd`
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/jedisct1/libsodium --branch stable
|
||||
cd libsodium
|
||||
SODIUM_DIR=`pwd`
|
||||
cd ..
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DZLIB_LIBRARY=/usr/lib/x86_64-linux-gnu/libz.so \
|
||||
-DZLIB_INCLUDE_DIR=$ZLIB_DIR \
|
||||
-DOPENSSL_ROOT_DIR=$OPENSSL_DIR \
|
||||
-DOPENSSL_INCLUDE_DIR=$OPENSSL_DIR/include \
|
||||
-DOPENSSL_CRYPTO_LIBRARY=$OPENSSL_DIR/libcrypto.so \
|
||||
-DOPENSSL_SSL_LIBRARY=$OPENSSL_DIR/libssl.so \
|
||||
-DTON_USE_ABSEIL=OFF ..
|
||||
|
||||
test $? -eq 0 || { echo "Can't configure TON build"; exit 1; }
|
||||
|
||||
ninja fift smc-envelope
|
||||
|
||||
test $? -eq 0 || { echo "Can't compile fift "; exit 1; }
|
||||
|
||||
rm -rf *
|
||||
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/emscripten-core/emsdk.git
|
||||
cd emsdk
|
||||
./emsdk install 3.1.19
|
||||
./emsdk activate 3.1.19
|
||||
EMSDK_DIR=`pwd`
|
||||
|
||||
source $EMSDK_DIR/emsdk_env.sh
|
||||
export CC=$(which emcc)
|
||||
export CXX=$(which em++)
|
||||
export CCACHE_DISABLE=1
|
||||
|
||||
cd ../openssl
|
||||
|
||||
make clean
|
||||
emconfigure ./Configure linux-generic32 no-shared no-dso no-engine no-unit-test no-ui
|
||||
sed -i 's/CROSS_COMPILE=.*/CROSS_COMPILE=/g' Makefile
|
||||
sed -i 's/-ldl//g' Makefile
|
||||
sed -i 's/-O3/-Os/g' Makefile
|
||||
emmake make depend
|
||||
emmake make -j16
|
||||
test $? -eq 0 || { echo "Can't compile OpenSSL with emmake "; exit 1; }
|
||||
|
||||
cd ../zlib
|
||||
|
||||
emconfigure ./configure --static
|
||||
emmake make -j16
|
||||
test $? -eq 0 || { echo "Can't compile zlib with emmake "; exit 1; }
|
||||
ZLIB_DIR=`pwd`
|
||||
|
||||
cd ../secp256k1
|
||||
|
||||
emconfigure ./configure --enable-module-recovery
|
||||
emmake make -j16
|
||||
test $? -eq 0 || { echo "Can't compile secp256k1 with emmake "; exit 1; }
|
||||
|
||||
cd ../libsodium
|
||||
|
||||
emconfigure ./configure --disable-ssp
|
||||
emmake make -j16
|
||||
test $? -eq 0 || { echo "Can't compile libsodium with emmake "; exit 1; }
|
||||
|
||||
cd ../build
|
||||
|
||||
emcmake cmake -DUSE_EMSCRIPTEN=ON -DCMAKE_BUILD_TYPE=Release \
|
||||
-DZLIB_LIBRARY=$ZLIB_DIR/libz.a \
|
||||
-DZLIB_INCLUDE_DIR=$ZLIB_DIR \
|
||||
-DOPENSSL_ROOT_DIR=$OPENSSL_DIR \
|
||||
-DOPENSSL_INCLUDE_DIR=$OPENSSL_DIR/include \
|
||||
-DOPENSSL_CRYPTO_LIBRARY=$OPENSSL_DIR/libcrypto.a \
|
||||
-DOPENSSL_SSL_LIBRARY=$OPENSSL_DIR/libssl.a \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$EMSDK_DIR/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
|
||||
-DCMAKE_CXX_FLAGS="-sUSE_ZLIB=1" \
|
||||
-DSECP256K1_INCLUDE_DIR=$SECP256K1_DIR/include \
|
||||
-DSECP256K1_LIBRARY=$SECP256K1_DIR/.libs/libsecp256k1.a \
|
||||
-DSODIUM_INCLUDE_DIR=$SODIUM_DIR/src/libsodium/include \
|
||||
-DSODIUM_LIBRARY_RELEASE=$SODIUM_DIR/src/libsodium/.libs/libsodium.a \
|
||||
-DSODIUM_LIBRARY_DEBUG=$SODIUM_DIR/src/libsodium/.libs/libsodium.a \
|
||||
-DSODIUM_USE_STATIC_LIBS=ON ..
|
||||
|
||||
test $? -eq 0 || { echo "Can't configure TON with emmake "; exit 1; }
|
||||
cp -R ../crypto/smartcont ../crypto/fift/lib crypto
|
||||
|
||||
emmake make -j16 funcfiftlib func fift tlbc emulator-emscripten
|
32
.github/workflows/build-ton-linux-android-tonlib.yml
vendored
Normal file
32
.github/workflows/build-ton-linux-android-tonlib.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: Tonlib Android
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Install system libraries
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential git cmake ninja-build automake libtool texinfo autoconf libgflags-dev \
|
||||
zlib1g-dev libssl-dev libreadline-dev libmicrohttpd-dev pkg-config libgsl-dev python3 python3-dev \
|
||||
libtool autoconf libsodium-dev libsecp256k1-dev
|
||||
|
||||
- name: Build TON
|
||||
run: |
|
||||
cp assembly/android/build-android-tonlib.sh .
|
||||
chmod +x build-android-tonlib.sh
|
||||
./build-android-tonlib.sh -a
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: tonlib-android
|
||||
path: artifacts
|
40
.github/workflows/build-ton-linux-x86-64-shared.yml
vendored
Normal file
40
.github/workflows/build-ton-linux-x86-64-shared.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Ubuntu TON build (shared, x86-64)
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04, ubuntu-22.04]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Install system libraries
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev
|
||||
|
||||
- name: Install clang-16
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 16 all
|
||||
|
||||
- name: Build TON
|
||||
run: |
|
||||
cp assembly/native/build-ubuntu-shared.sh .
|
||||
chmod +x build-ubuntu-shared.sh
|
||||
./build-ubuntu-shared.sh -t -a
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-binaries-${{ matrix.os }}
|
||||
path: artifacts
|
25
.github/workflows/build-ton-macos-x86-64-shared.yml
vendored
Normal file
25
.github/workflows/build-ton-macos-x86-64-shared.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: MacOS TON build (shared, x86-64)
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-12
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Build TON
|
||||
run: |
|
||||
cp assembly/native/build-macos-shared.sh .
|
||||
chmod +x build-macos-shared.sh
|
||||
./build-macos-shared.sh -t -a
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-binaries-macos-12
|
||||
path: artifacts
|
30
.github/workflows/build-ton-wasm-emscripten.yml
vendored
Normal file
30
.github/workflows/build-ton-wasm-emscripten.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Emscripten TON build (wasm)
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Install system libraries
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential git openssl cmake ninja-build zlib1g-dev libssl-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev
|
||||
|
||||
- name: Build TON WASM artifacts
|
||||
run: |
|
||||
cd assembly/wasm
|
||||
chmod +x fift-func-wasm-build-ubuntu.sh
|
||||
./fift-func-wasm-build-ubuntu.sh -a
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-wasm-binaries
|
||||
path: artifacts
|
6
.github/workflows/create-release.yml
vendored
6
.github/workflows/create-release.yml
vendored
|
@ -46,7 +46,7 @@ jobs:
|
|||
- name: Download Windows artifacts
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
workflow: win-2019-compile.yml
|
||||
workflow: ton-x86-64-windows.yml
|
||||
path: artifacts
|
||||
workflow_conclusion: success
|
||||
skip_unpack: true
|
||||
|
@ -54,7 +54,7 @@ jobs:
|
|||
- name: Download and unzip Windows artifacts
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
workflow: win-2019-compile.yml
|
||||
workflow: ton-x86-64-windows.yml
|
||||
path: artifacts
|
||||
workflow_conclusion: success
|
||||
skip_unpack: false
|
||||
|
@ -62,7 +62,7 @@ jobs:
|
|||
- name: Download WASM artifacts
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
workflow: ton-wasm-emscripten.yml
|
||||
workflow: build-ton-wasm-emscripten.yml
|
||||
path: artifacts
|
||||
workflow_conclusion: success
|
||||
skip_unpack: true
|
||||
|
|
106
.github/workflows/macos-11.7-compile.yml
vendored
106
.github/workflows/macos-11.7-compile.yml
vendored
|
@ -1,106 +0,0 @@
|
|||
name: MacOS 11.7 Big Sur x86-64 Compile
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: macos-11
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Compile Secp256k1
|
||||
run: |
|
||||
export NONINTERACTIVE=1
|
||||
brew install ninja secp256k1 libsodium libmicrohttpd pkg-config automake libtool
|
||||
git clone https://github.com/libbitcoin/secp256k1.git
|
||||
cd secp256k1
|
||||
./autogen.sh
|
||||
./configure --enable-module-recovery
|
||||
make
|
||||
make install
|
||||
|
||||
- name: Build all
|
||||
run: |
|
||||
brew unlink openssl@1.1
|
||||
brew install openssl@3
|
||||
brew unlink openssl@3 && brew link --overwrite openssl@3
|
||||
rootPath=`pwd`
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -GNinja -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11.7 -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
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 json2tlo dht-server \
|
||||
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator \
|
||||
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-fec test-tddb test-db test-validator-session-state
|
||||
|
||||
- name: Strip binaries
|
||||
run: |
|
||||
strip build/storage/storage-daemon/storage-daemon
|
||||
strip build/storage/storage-daemon/storage-daemon-cli
|
||||
strip build/blockchain-explorer/blockchain-explorer
|
||||
strip build/crypto/fift
|
||||
strip build/crypto/func
|
||||
strip build/crypto/create-state
|
||||
strip build/crypto/tlbc
|
||||
strip build/validator-engine-console/validator-engine-console
|
||||
strip build/tonlib/tonlib-cli
|
||||
strip build/http/http-proxy
|
||||
strip build/rldp-http-proxy/rldp-http-proxy
|
||||
strip build/dht-server/dht-server
|
||||
strip build/lite-client/lite-client
|
||||
strip build/validator-engine/validator-engine
|
||||
strip build/utils/generate-random-id
|
||||
strip build/utils/json2tlo
|
||||
strip build/adnl/adnl-proxy
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd build
|
||||
ctest --output-on-failure -E "test-catchain|test-actors"
|
||||
|
||||
- name: Find & copy binaries
|
||||
run: |
|
||||
mkdir artifacts
|
||||
cp build/storage/storage-daemon/storage-daemon artifacts/
|
||||
cp build/storage/storage-daemon/storage-daemon-cli artifacts/
|
||||
cp build/blockchain-explorer/blockchain-explorer artifacts/
|
||||
cp build/crypto/fift artifacts/
|
||||
cp build/crypto/func artifacts/
|
||||
cp build/crypto/create-state artifacts/
|
||||
cp build/crypto/tlbc artifacts/
|
||||
cp build/validator-engine-console/validator-engine-console artifacts/
|
||||
cp build/tonlib/tonlib-cli artifacts/
|
||||
cp build/tonlib/libtonlibjson.0.5.dylib artifacts/libtonlibjson.dylib
|
||||
cp build/http/http-proxy artifacts/
|
||||
cp build/rldp-http-proxy/rldp-http-proxy artifacts/
|
||||
cp build/dht-server/dht-server artifacts/
|
||||
cp build/lite-client/lite-client artifacts/
|
||||
cp build/validator-engine/validator-engine artifacts/
|
||||
cp build/utils/generate-random-id artifacts/
|
||||
cp build/utils/json2tlo artifacts/
|
||||
cp build/adnl/adnl-proxy artifacts/
|
||||
cp build/emulator/*emulator.* artifacts/
|
||||
chmod +x artifacts/*
|
||||
rsync -r crypto/smartcont artifacts/
|
||||
rsync -r crypto/fift/lib artifacts/
|
||||
ls -laRt artifacts
|
||||
|
||||
- name: Simple binaries test
|
||||
run: |
|
||||
artifacts/validator-engine -V
|
||||
artifacts/lite-client -V
|
||||
artifacts/fift -V
|
||||
artifacts/func -V
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-macos-11.7
|
||||
path: artifacts
|
106
.github/workflows/macos-12.6-compile.yml
vendored
106
.github/workflows/macos-12.6-compile.yml
vendored
|
@ -1,106 +0,0 @@
|
|||
name: MacOS 12.6 Monterey x86-64 Compile
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: macos-12
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Compile Secp256k1
|
||||
run: |
|
||||
export NONINTERACTIVE=1
|
||||
brew install ninja secp256k1 libsodium libmicrohttpd pkg-config automake libtool
|
||||
git clone https://github.com/libbitcoin/secp256k1.git
|
||||
cd secp256k1
|
||||
./autogen.sh
|
||||
./configure --enable-module-recovery
|
||||
make
|
||||
make install
|
||||
|
||||
- name: Build all
|
||||
run: |
|
||||
brew unlink openssl@1.1
|
||||
brew install openssl@3
|
||||
brew unlink openssl@3 && brew link --overwrite openssl@3
|
||||
rootPath=`pwd`
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -GNinja -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=12.6 -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
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 json2tlo dht-server \
|
||||
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator \
|
||||
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-fec test-tddb test-db test-validator-session-state
|
||||
|
||||
- name: Strip binaries
|
||||
run: |
|
||||
strip build/storage/storage-daemon/storage-daemon
|
||||
strip build/storage/storage-daemon/storage-daemon-cli
|
||||
strip build/blockchain-explorer/blockchain-explorer
|
||||
strip build/crypto/fift
|
||||
strip build/crypto/func
|
||||
strip build/crypto/create-state
|
||||
strip build/crypto/tlbc
|
||||
strip build/validator-engine-console/validator-engine-console
|
||||
strip build/tonlib/tonlib-cli
|
||||
strip build/http/http-proxy
|
||||
strip build/rldp-http-proxy/rldp-http-proxy
|
||||
strip build/dht-server/dht-server
|
||||
strip build/lite-client/lite-client
|
||||
strip build/validator-engine/validator-engine
|
||||
strip build/utils/generate-random-id
|
||||
strip build/utils/json2tlo
|
||||
strip build/adnl/adnl-proxy
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd build
|
||||
ctest --output-on-failure -E "test-catchain|test-actors"
|
||||
|
||||
- name: Find & copy binaries
|
||||
run: |
|
||||
mkdir artifacts
|
||||
cp build/storage/storage-daemon/storage-daemon artifacts/
|
||||
cp build/storage/storage-daemon/storage-daemon-cli artifacts/
|
||||
cp build/blockchain-explorer/blockchain-explorer artifacts/
|
||||
cp build/crypto/fift artifacts/
|
||||
cp build/crypto/func artifacts/
|
||||
cp build/crypto/create-state artifacts/
|
||||
cp build/crypto/tlbc artifacts/
|
||||
cp build/validator-engine-console/validator-engine-console artifacts/
|
||||
cp build/tonlib/tonlib-cli artifacts/
|
||||
cp build/tonlib/libtonlibjson.0.5.dylib artifacts/libtonlibjson.dylib
|
||||
cp build/http/http-proxy artifacts/
|
||||
cp build/rldp-http-proxy/rldp-http-proxy artifacts/
|
||||
cp build/dht-server/dht-server artifacts/
|
||||
cp build/lite-client/lite-client artifacts/
|
||||
cp build/validator-engine/validator-engine artifacts/
|
||||
cp build/utils/generate-random-id artifacts/
|
||||
cp build/utils/json2tlo artifacts/
|
||||
cp build/adnl/adnl-proxy artifacts/
|
||||
cp build/emulator/*emulator.* artifacts/
|
||||
chmod +x artifacts/*
|
||||
rsync -r crypto/smartcont artifacts/
|
||||
rsync -r crypto/fift/lib artifacts/
|
||||
ls -laRt artifacts
|
||||
|
||||
- name: Simple binaries test
|
||||
run: |
|
||||
artifacts/validator-engine -V
|
||||
artifacts/lite-client -V
|
||||
artifacts/fift -V
|
||||
artifacts/func -V
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-macos-12.6
|
||||
path: artifacts
|
50
.github/workflows/ton-aarch64-linux.yml
vendored
50
.github/workflows/ton-aarch64-linux.yml
vendored
|
@ -1,50 +0,0 @@
|
|||
name: "TON aarch64 Linux binaries"
|
||||
|
||||
on: [workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- run: |
|
||||
sudo apt update
|
||||
sudo apt install -y apt-utils
|
||||
sudo apt install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- uses: cachix/install-nix-action@v18
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Compile
|
||||
run: nix build .?submodules=1#packages.aarch64-linux.ton-oldglibc_staticbinaries --print-build-logs --system aarch64-linux -o result-aarch64
|
||||
|
||||
- name: Copy binaries
|
||||
run: |
|
||||
ls -lart
|
||||
mkdir artifacts
|
||||
cp $PWD/result-aarch64-linux/bin/* artifacts/
|
||||
chmod +x artifacts/*
|
||||
cp $PWD/result-aarch64-linux/lib/libtonlibjson.so.0.5 artifacts/libtonlibjson.so
|
||||
cp $PWD/result-aarch64-linux/lib/libemulator.so artifacts/
|
||||
cp -R crypto/smartcont artifacts/
|
||||
cp -R crypto/fift/lib artifacts/
|
||||
|
||||
- name: Simple binaries test
|
||||
run: |
|
||||
sudo mv /nix/store /nix/store2
|
||||
artifacts/validator-engine -V
|
||||
artifacts/lite-client -V
|
||||
artifacts/fift -V
|
||||
artifacts/func -V
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-aarch64-linux-binaries
|
||||
path: artifacts
|
47
.github/workflows/ton-aarch64-macos.yml
vendored
47
.github/workflows/ton-aarch64-macos.yml
vendored
|
@ -1,47 +0,0 @@
|
|||
name: "TON aarch64 macOS binaries"
|
||||
|
||||
on: [workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-12
|
||||
|
||||
steps:
|
||||
- run: brew install qemu
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- uses: cachix/install-nix-action@v18
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Compile
|
||||
run: nix build .?submodules=1#packages.aarch64-darwin.ton-staticbin-dylib --print-build-logs -o result-aarch64-darwin
|
||||
|
||||
- name: Copy binaries
|
||||
run: |
|
||||
ls -lart
|
||||
mkdir artifacts
|
||||
cp $PWD/result-aarch64-darwin/bin/* artifacts/
|
||||
chmod +x artifacts/*
|
||||
cp $PWD/result-aarch64-darwin/lib/libtonlibjson* artifacts/
|
||||
cp $PWD/result-aarch64-darwin/lib/libemulator* artifacts/
|
||||
cp -R crypto/smartcont artifacts/
|
||||
cp -R crypto/fift/lib artifacts/
|
||||
|
||||
- name: Simple binaries test
|
||||
run: |
|
||||
sudo mv /nix/store /nix/store2
|
||||
artifacts/validator-engine -V
|
||||
artifacts/lite-client -V
|
||||
artifacts/fift -V
|
||||
artifacts/func -V
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-aarch64-macos-binaries
|
||||
path: artifacts
|
3
.github/workflows/ton-ccpcheck.yml
vendored
3
.github/workflows/ton-ccpcheck.yml
vendored
|
@ -1,10 +1,9 @@
|
|||
name: TON Ccpcheck
|
||||
name: TON Static Code Analysis
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
|
|
46
.github/workflows/ton-wasm-emscripten.yml
vendored
46
.github/workflows/ton-wasm-emscripten.yml
vendored
|
@ -1,46 +0,0 @@
|
|||
name: TON WASM Compile
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Install libraries
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y build-essential git make cmake ninja-build clang libgflags-dev zlib1g-dev libssl-dev libreadline-dev libmicrohttpd-dev pkg-config libgsl-dev python3 python3-dev python3-pip nodejs libsecp256k1-dev libsodium-dev automake libtool
|
||||
|
||||
- name: Setup compiler
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 16 all
|
||||
|
||||
- name: Configure & Build
|
||||
run: |
|
||||
cd .github/script
|
||||
./fift-func-wasm-build-ubuntu.sh
|
||||
|
||||
- name: Find & copy binaries
|
||||
run: |
|
||||
mkdir artifacts
|
||||
ls build/crypto
|
||||
cp build/crypto/fift* artifacts
|
||||
cp build/crypto/func* artifacts
|
||||
cp build/crypto/tlbc* artifacts
|
||||
cp build/emulator/emulator-emscripten* artifacts
|
||||
cp -R crypto/smartcont artifacts
|
||||
cp -R crypto/fift/lib artifacts
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-wasm-binaries
|
||||
path: artifacts
|
18
.github/workflows/ton-x86-64-linux.yml
vendored
18
.github/workflows/ton-x86-64-linux.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: "TON x86_64 Linux binaries"
|
||||
name: Ubuntu TON build (portable, x86-64)
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
|
@ -20,19 +20,11 @@ jobs:
|
|||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Compile
|
||||
run: nix build .?submodules=1#packages.x86_64-linux.ton-oldglibc_staticbinaries --print-build-logs --system x86_64-linux -o result-x86_64
|
||||
|
||||
- name: Copy binaries
|
||||
- name: Build TON
|
||||
run: |
|
||||
ls -lart
|
||||
mkdir artifacts
|
||||
cp $PWD/result-x86_64/bin/* artifacts/
|
||||
chmod +x artifacts/*
|
||||
cp $PWD/result-x86_64/lib/libtonlibjson.so.0.5 artifacts/libtonlibjson.so
|
||||
cp $PWD/result-x86_64/lib/libemulator.so artifacts/
|
||||
cp -R crypto/smartcont artifacts/
|
||||
cp -R crypto/fift/lib artifacts/
|
||||
cp assembly/nix/build-linux-x86-64-nix.sh .
|
||||
chmod +x build-linux-x86-64-nix.sh
|
||||
./build-linux-x86-64-nix.sh
|
||||
|
||||
- name: Simple binaries test
|
||||
run: |
|
||||
|
|
18
.github/workflows/ton-x86-64-macos.yml
vendored
18
.github/workflows/ton-x86-64-macos.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: "TON x86_64 macOS binaries"
|
||||
name: MacOS TON build (portable, x86-64)
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
|
@ -16,19 +16,11 @@ jobs:
|
|||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Compile
|
||||
run: nix build .?submodules=1#packages.x86_64-darwin.ton-staticbin-dylib --print-build-logs -o result-x86_64-darwin
|
||||
|
||||
- name: Copy binaries
|
||||
- name: Build TON
|
||||
run: |
|
||||
ls -lart
|
||||
mkdir artifacts
|
||||
cp $PWD/result-x86_64-darwin/bin/* artifacts/
|
||||
chmod +x artifacts/*
|
||||
cp $PWD/result-x86_64-darwin/lib/libtonlibjson.dylib artifacts/
|
||||
cp $PWD/result-x86_64-darwin/lib/libemulator.dylib artifacts/
|
||||
cp -R crypto/smartcont artifacts/
|
||||
cp -R crypto/fift/lib artifacts/
|
||||
cp assembly/nix/build-macos-nix.sh .
|
||||
chmod +x build-macos-nix.sh
|
||||
./build-macos-nix.sh
|
||||
|
||||
- name: Simple binaries test
|
||||
run: |
|
||||
|
|
34
.github/workflows/ton-x86-64-windows.yml
vendored
Normal file
34
.github/workflows/ton-x86-64-windows.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Windows TON build (portable, x86-64)
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: cmd
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-2022
|
||||
|
||||
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: Build TON
|
||||
run: |
|
||||
copy assembly\native\build-windows-github.bat .
|
||||
copy assembly\native\build-windows.bat .
|
||||
build-windows-github.bat Enterprise
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-win-binaries
|
||||
path: artifacts
|
61
.github/workflows/tonlib-android-jni.yml
vendored
61
.github/workflows/tonlib-android-jni.yml
vendored
|
@ -1,61 +0,0 @@
|
|||
name: Tonlib Android JNI
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Install libraries
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y build-essential git make cmake clang libgflags-dev zlib1g-dev libssl-dev libreadline-dev libmicrohttpd-dev pkg-config libgsl-dev python3 python3-dev ninja-build
|
||||
|
||||
- name: Configure & Build
|
||||
run: |
|
||||
wget -q https://dl.google.com/android/repository/android-ndk-r25b-linux.zip
|
||||
unzip -q android-ndk-r25b-linux.zip
|
||||
export JAVA_AWT_LIBRARY=NotNeeded
|
||||
export JAVA_JVM_LIBRARY=NotNeeded
|
||||
export JAVA_INCLUDE_PATH=${JAVA_HOME}/include
|
||||
export JAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include
|
||||
export JAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux
|
||||
|
||||
export ANDROID_NDK_ROOT=$(pwd)/android-ndk-r25b
|
||||
export NDK_PLATFORM="android-21"
|
||||
export ANDROID_PLATFORM="android-21"
|
||||
export OPENSSL_DIR=$(pwd)/example/android/third_party/crypto
|
||||
|
||||
rm -rf example/android/src/drinkless/org/ton/TonApi.java
|
||||
cd example/android/
|
||||
|
||||
sudo apt install -y libtool autoconf libsodium-dev libsecp256k1-dev
|
||||
|
||||
cmake -GNinja -DTON_ONLY_TONLIB=ON .
|
||||
|
||||
ninja prepare_cross_compiling
|
||||
|
||||
sudo apt remove -y libsodium-dev libsecp256k1-dev
|
||||
|
||||
rm CMakeCache.txt
|
||||
./build-all.sh
|
||||
find . -name "*.debug" -type f -delete
|
||||
|
||||
- name: Find & copy binaries
|
||||
run: |
|
||||
mkdir -p artifacts/tonlib-android-jni
|
||||
cp example/android/src/drinkless/org/ton/TonApi.java artifacts/tonlib-android-jni/
|
||||
cp -R example/android/libs/* artifacts/tonlib-android-jni/
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: tonlib-android-jni
|
||||
path: artifacts
|
78
.github/workflows/ubuntu-22.04-compile.yml
vendored
78
.github/workflows/ubuntu-22.04-compile.yml
vendored
|
@ -1,78 +0,0 @@
|
|||
name: Ubuntu 22.04 Compile
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Install libraries
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y build-essential git make cmake clang libgflags-dev zlib1g-dev libssl-dev libreadline-dev libmicrohttpd-dev pkg-config libgsl-dev python3 python3-dev ninja-build libsecp256k1-dev libsodium-dev
|
||||
|
||||
- name: Show CPU flags
|
||||
run: |
|
||||
cat /proc/cpuinfo
|
||||
|
||||
- name: Configure & Build
|
||||
run: |
|
||||
export CC=$(which clang)
|
||||
export CXX=$(which clang++)
|
||||
export CCACHE_DISABLE=1
|
||||
|
||||
git clone https://github.com/openssl/openssl openssl_3
|
||||
cd openssl_3
|
||||
git checkout openssl-3.1.4
|
||||
./config
|
||||
make build_libs -j4
|
||||
|
||||
cd ..
|
||||
rootPath=`pwd`
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake -GNinja -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=$rootPath/openssl_3/include -DOPENSSL_CRYPTO_LIBRARY=$rootPath/openssl_3/libcrypto.a -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= ..
|
||||
|
||||
ninja storage-daemon storage-daemon-cli 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 emulator \
|
||||
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-fec test-tddb test-db test-validator-session-state
|
||||
|
||||
- name: Strip binaries
|
||||
run: |
|
||||
strip -g build/storage/storage-daemon/storage-daemon build/storage/storage-daemon/storage-daemon-cli build/crypto/fift 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/http/http-proxy 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/json2tlo build/adnl/adnl-proxy build/emulator/libemulator.*
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd build
|
||||
ctest --output-on-failure -E "test-catchain|test-actors"
|
||||
|
||||
- name: Find & copy binaries
|
||||
run: |
|
||||
mkdir artifacts
|
||||
cp build/storage/storage-daemon/storage-daemon build/storage/storage-daemon/storage-daemon-cli build/crypto/fift 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/http/http-proxy 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/json2tlo build/adnl/adnl-proxy build/emulator/libemulator.* artifacts
|
||||
chmod +x artifacts/*
|
||||
cp -R crypto/smartcont artifacts/
|
||||
cp -R crypto/fift/lib artifacts/
|
||||
|
||||
- name: Simple binaries test
|
||||
run: |
|
||||
artifacts/validator-engine -V
|
||||
artifacts/lite-client -V
|
||||
artifacts/fift -V
|
||||
artifacts/func -V
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-ubuntu-binaries
|
||||
path: artifacts
|
81
.github/workflows/ubuntu-compile.yml
vendored
81
.github/workflows/ubuntu-compile.yml
vendored
|
@ -1,81 +0,0 @@
|
|||
name: Ubuntu Compile x86-64
|
||||
|
||||
on: [push,workflow_dispatch,workflow_call]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04, ubuntu-22.04]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Install libraries
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y build-essential git make cmake clang libgflags-dev zlib1g-dev libssl-dev libreadline-dev libmicrohttpd-dev pkg-config libgsl-dev python3 python3-dev ninja-build libsecp256k1-dev libsodium-dev
|
||||
|
||||
- name: Show CPU flags
|
||||
run: |
|
||||
cat /proc/cpuinfo
|
||||
|
||||
- name: Configure & Build
|
||||
run: |
|
||||
export CC=$(which clang)
|
||||
export CXX=$(which clang++)
|
||||
export CCACHE_DISABLE=1
|
||||
|
||||
mkdir build-${{ matrix.os }}
|
||||
cd build-${{ matrix.os }}
|
||||
|
||||
git clone https://github.com/openssl/openssl openssl_3
|
||||
cd openssl_3
|
||||
git checkout openssl-3.1.4
|
||||
./config
|
||||
make build_libs -j4
|
||||
|
||||
cd ..
|
||||
rootPath=`pwd`
|
||||
|
||||
cmake -GNinja -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=$rootPath/openssl_3/include -DOPENSSL_CRYPTO_LIBRARY=$rootPath/openssl_3/libcrypto.a -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= ..
|
||||
ninja storage-daemon storage-daemon-cli 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 \
|
||||
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-fec test-tddb test-db test-validator-session-state
|
||||
|
||||
- name: Strip binaries
|
||||
run: |
|
||||
strip -g build-${{ matrix.os }}/storage/storage-daemon/storage-daemon build-${{ matrix.os }}/storage/storage-daemon/storage-daemon-cli build-${{ matrix.os }}/crypto/fift build-${{ matrix.os }}/crypto/tlbc build-${{ matrix.os }}/crypto/func build-${{ matrix.os }}/crypto/create-state build-${{ matrix.os }}/validator-engine-console/validator-engine-console build-${{ matrix.os }}/tonlib/tonlib-cli build-${{ matrix.os }}/tonlib/libtonlibjson.so.0.5 build-${{ matrix.os }}/http/http-proxy build-${{ matrix.os }}/rldp-http-proxy/rldp-http-proxy build-${{ matrix.os }}/dht-server/dht-server build-${{ matrix.os }}/lite-client/lite-client build-${{ matrix.os }}/validator-engine/validator-engine build-${{ matrix.os }}/utils/generate-random-id build-${{ matrix.os }}/utils/json2tlo build-${{ matrix.os }}/adnl/adnl-proxy build-${{ matrix.os }}/emulator/libemulator.*
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd build-${{ matrix.os }}
|
||||
ctest --output-on-failure -E "test-catchain|test-actors"
|
||||
|
||||
- name: Find & copy binaries
|
||||
run: |
|
||||
mkdir artifacts-${{ matrix.os }}
|
||||
cp build-${{ matrix.os }}/storage/storage-daemon/storage-daemon build-${{ matrix.os }}/storage/storage-daemon/storage-daemon-cli build-${{ matrix.os }}/crypto/fift build-${{ matrix.os }}/crypto/tlbc build-${{ matrix.os }}/crypto/func build-${{ matrix.os }}/crypto/create-state build-${{ matrix.os }}/validator-engine-console/validator-engine-console build-${{ matrix.os }}/tonlib/tonlib-cli build-${{ matrix.os }}/tonlib/libtonlibjson.so.0.5 build-${{ matrix.os }}/http/http-proxy build-${{ matrix.os }}/rldp-http-proxy/rldp-http-proxy build-${{ matrix.os }}/dht-server/dht-server build-${{ matrix.os }}/lite-client/lite-client build-${{ matrix.os }}/validator-engine/validator-engine build-${{ matrix.os }}/utils/generate-random-id build-${{ matrix.os }}/utils/json2tlo build-${{ matrix.os }}/adnl/adnl-proxy build-${{ matrix.os }}/emulator/libemulator.* artifacts-${{ matrix.os }}
|
||||
chmod +x artifacts-${{ matrix.os }}/*
|
||||
cp -R crypto/smartcont artifacts-${{ matrix.os }}
|
||||
cp -R crypto/fift/lib artifacts-${{ matrix.os }}
|
||||
|
||||
- name: Simple binaries test
|
||||
run: |
|
||||
artifacts-${{ matrix.os }}/validator-engine -V
|
||||
artifacts-${{ matrix.os }}/lite-client -V
|
||||
artifacts-${{ matrix.os }}/fift -V
|
||||
artifacts-${{ matrix.os }}/func -V
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ton-binaries-${{ matrix.os }}
|
||||
path: artifacts-${{ matrix.os }}
|
108
.github/workflows/win-2019-compile.yml
vendored
108
.github/workflows/win-2019-compile.yml
vendored
|
@ -1,108 +0,0 @@
|
|||
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/setup-msbuild@v1.1
|
||||
|
||||
- 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 3 Win64
|
||||
run: |
|
||||
curl -Lo openssl-3.1.4.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/openssl-3.1.4.zip
|
||||
unzip openssl-3.1.4.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 -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-3.1.4/x64/include -DOPENSSL_CRYPTO_LIBRARY=%root%/openssl-3.1.4/x64/lib/libcrypto_static.lib -DCMAKE_CXX_FLAGS="/DTD_WINDOWS=1 /EHsc /bigobj /W0" ..
|
||||
cmake --build . --config Release --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 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-fec test-tddb test-db test-validator-session-state
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd build
|
||||
ctest -C Release --output-on-failure -E "test-catchain|test-actors|test-validator-session-state"
|
||||
|
||||
- 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) do (strip -g %%I & 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
|
Loading…
Add table
Add a link
Reference in a new issue