mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-15 04:32:21 +00:00
Add cross-platform Linux and macOS binaries (statically compiled with NixPkgs) + wasm artifacts (#621)
* fix build * nix flake * nix package * static musl build env * make all builds in static env * GH Actions nightly and static workflows * deb package * cmake install {adnl-proxy,blockchain-explorer,create-state,http-proxy,rldp-http-proxy,storage-cli} * nix flake: add static glibc build variant * GH Actions: deb-nightly-{musl,glibc_static}, tests-rolling jobs * rpm package * build blockchain-explorer * GH Actions: deb_rpm-nightly: ubuntu-{latest=>22.04} * crypto/pow-miner: skip install * ghactions: tests-rolling: show tests run, progress * ghactions: deb_rpm-nightly: add manual trigger [skip ci] * nix flake refactor * find_package=>pkg-config(zlib) FindZLIB.cmake can't find static zlib prior to CMake 3.24, so use pkg-config. * nix old glibc build * nix aarch64 support * packages: Populate APT and RPM repos at ton-repo - {deb,rpm}.sh: Separate build and install dirs - rpm.sh: Conditionally include lib/ - Accomodate local CI runs w/act * [skip ci] README packages * fix aarch64 build -Wnoerror=address * [skip ci] rpm set releasever * [skip ci] document local packages upload * m1 build: gate cpu=apple-m1 by clang version * packages: Ship musl binaries + old glibc dylibs * packages: macos build * nix: bump nixpkgs * fix windows CI build * [skip ci] nix: static aarch64 builds * packages: deb,rpm multiarch * ghactions: aarch64 musl deb,rpm build * [skip ci] deb build: deref source links, -x * [skip ci] nix darwin static build * [skip ci] nix common hostPkgs * [skip ci] brew: move formula over to homebrew-ton-repo * [skip ci] nix fix aarch64-linux build * [skip ci] ghactions: nix use GITHUB_TOKEN * [skip ci] Move from ton-repo to gh releases * [skip ci] ghactions aarch64-darwin self-hosted runner * [skip ci] ghactions deb,rpm nightly 10h timeout * [skip ci] fix brew install fixes Errno::EACCES: Permission denied @ dir_s_mkdir - /private/tmp/ton-XXX/bin/.brew_home * [skip ci] ghactions deb,rpm nightly: don't upload ton-packages as we gh release them later * [skip ci] README: brew instructions * [skip ci] nightly linux binaries release * [skip ci] packages: ship macos dylib * [skip ci] ghactions: Run Windows build nightly, upload to gh releases * nix: remove defaultPackage, switch to different oldglibc build method We used to rebuild nixpkgs-stable with old glibc, which broke on aarch64 due to its particular bootstrap toolchain. This just takes nixos 19.09's version of GCC but new dependencies, sidestepping the issue. * fix rpm release, add aur release * fix local (act) ci run * ghactions: linux-nightly: Print out SSH public keys * ghactions: bump cachix actions * nix: default devShell * [skip ci] rpm,aur: Ship lib * [skip ci] packages: windows: Remove CMake files from out * [skip ci] packages: Import chocolatey package * fixup! fix rpm release, add aur release * [skip ci] packages: aarch64-linux: build dylib as well * [skip ci] ghactions: run on self-hosted * [skip ci] ghactions: windows-nightly: Bump nodejs actions * [skip ci] nix: Only add Linux packaging tools on Linux * [skip ci] doc: document direct download binaries in README * fix tonlib android jni ci * fixup! fix tonlib android jni ci * [skip ci] ghactions: Update GH release dates Errata: doesn't update tags. * [skip ci] ghactions: Fix racy brew gh release by splitting arch * initiali commit - binaries only * fixes * fixes * fixes * fixes * remove packages dir for now * add storage-daemon storage-daemon-cli * fix emulator * try macos aarch64 * try macos aarch64 * try macos aarch64 * try macos aarch64 * try macos aarch64 * try macos aarch64 * try macos aarch64 * try macos aarch64 * try macos aarch64 * try macos aarch64 * try macos aarch64 sh * try macos aarch64 sh * try macos aarch64 bash * try macos aarch64 bash * try macos aarch64 bash * try macos aarch64 bash * try macos aarch64 bash * try macos aarch64 bash * try macos aarch64 bash * fix funcfiftlib compilation with emscripten * fix funcfiftlib compilation with emscripten * add github action to compile TON with emscripten * add github action to compile TON with emscripten * add github action to compile TON with emscripten * add github action to compile TON with emscripten * add github action to compile TON with emscripten * add github action to compile TON with emscripten * try macos aarch64 * fix funcfiftlib compilation with emscripten * fix funcfiftlib compilation with emscripten * add github action to compile TON with emscripten * disable aarch64 github actions for now * disable aarch64 github actions for now * trigger all GH actions * trigger all GH actions 2 * trigger all GH actions 3 * trigger all GH actions 4 * trigger all GH actions 5 * put back rldp-http-proxy to win build * put back rldp-http-proxy to win build * dont use pkgConfig for zlib * fix zlib_library * use BUILD_SHARED_LIBS flag for static compilation * test 1 * test 2 * add wasm binaries to release. test 3 * add simple binaries' execution test * build emulator-emscripten * build and add into artifacts wasm tlbc and emulator-emscripten * build and add into artifacts wasm tlbc and emulator-emscripten, 2 * build and add into artifacts wasm tlbc and emulator-emscripten, 3 * build and add into artifacts wasm tlbc and emulator-emscripten, 4 * build emulator-emscripten with static libs * minor nix mac aarch64 fix * add single artifacts to release * bypass $repo to Dockerfile * add wasm artifacts to release * add wasm artifacts to release * add wasm artifacts to release * add wasm artifacts to release * add more artifacts to release; remove compilation against Ubuntu 18.04. * retrieve GITHUB_TOKEN for ton-blockchain/ton * remove binary check for arm64 --------- Co-authored-by: tonthemoon <tonthemoon@mailbox.org>
This commit is contained in:
parent
470b97fa2c
commit
5a47495d87
39 changed files with 858 additions and 180 deletions
19
.github/script/amd64-18.04.Dockerfile
vendored
19
.github/script/amd64-18.04.Dockerfile
vendored
|
@ -1,19 +0,0 @@
|
||||||
FROM ubuntu:18.04
|
|
||||||
|
|
||||||
RUN apt update
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
|
||||||
RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
ARG BRANCH
|
|
||||||
RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git && cd ton && git checkout $BRANCH
|
|
||||||
|
|
||||||
WORKDIR /ton
|
|
||||||
RUN mkdir /ton/build
|
|
||||||
WORKDIR /ton/build
|
|
||||||
ENV CC clang
|
|
||||||
ENV CXX clang++
|
|
||||||
ENV CCACHE_DISABLE 1
|
|
||||||
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= -DCMAKE_CXX_FLAGS="-mavx2" ..
|
|
||||||
RUN ninja storage-daemon storage-daemon-cli tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client
|
|
5
.github/script/amd64-20.04.Dockerfile
vendored
5
.github/script/amd64-20.04.Dockerfile
vendored
|
@ -2,12 +2,13 @@ FROM ubuntu:20.04
|
||||||
|
|
||||||
RUN apt update
|
RUN apt update
|
||||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
||||||
RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build
|
RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build pkg-config
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
ARG BRANCH
|
ARG BRANCH
|
||||||
RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git && cd ton && git checkout $BRANCH
|
ARG REPO
|
||||||
|
RUN git clone --recurse-submodules https://github.com/$REPO && cd ton && git checkout $BRANCH
|
||||||
|
|
||||||
WORKDIR /ton
|
WORKDIR /ton
|
||||||
RUN mkdir /ton/build
|
RUN mkdir /ton/build
|
||||||
|
|
5
.github/script/amd64-22.04.Dockerfile
vendored
5
.github/script/amd64-22.04.Dockerfile
vendored
|
@ -2,12 +2,13 @@ FROM ubuntu:22.04
|
||||||
|
|
||||||
RUN apt update
|
RUN apt update
|
||||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
||||||
RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build
|
RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build pkg-config
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
ARG BRANCH
|
ARG BRANCH
|
||||||
RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git && cd ton && git checkout $BRANCH
|
ARG REPO
|
||||||
|
RUN git clone --recurse-submodules https://github.com/$REPO && cd ton && git checkout $BRANCH
|
||||||
|
|
||||||
WORKDIR /ton
|
WORKDIR /ton
|
||||||
RUN mkdir /ton/build
|
RUN mkdir /ton/build
|
||||||
|
|
19
.github/script/arm64-18.04.Dockerfile
vendored
19
.github/script/arm64-18.04.Dockerfile
vendored
|
@ -1,19 +0,0 @@
|
||||||
FROM ubuntu:18.04
|
|
||||||
|
|
||||||
RUN apt update
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
|
||||||
RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
ARG BRANCH
|
|
||||||
RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git && cd ton && git checkout $BRANCH
|
|
||||||
|
|
||||||
WORKDIR /ton
|
|
||||||
RUN mkdir /ton/build
|
|
||||||
WORKDIR /ton/build
|
|
||||||
ENV CC clang
|
|
||||||
ENV CXX clang++
|
|
||||||
ENV CCACHE_DISABLE 1
|
|
||||||
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= ..
|
|
||||||
RUN ninja storage-daemon storage-daemon-cli tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id dht-server lite-client
|
|
5
.github/script/arm64-20.04.Dockerfile
vendored
5
.github/script/arm64-20.04.Dockerfile
vendored
|
@ -2,12 +2,13 @@ FROM ubuntu:20.04
|
||||||
|
|
||||||
RUN apt update
|
RUN apt update
|
||||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
||||||
RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build
|
RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build pkg-config
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
ARG BRANCH
|
ARG BRANCH
|
||||||
RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git && cd ton && git checkout $BRANCH
|
ARG REPO
|
||||||
|
RUN git clone --recurse-submodules https://github.com/$REPO && cd ton && git checkout $BRANCH
|
||||||
|
|
||||||
WORKDIR /ton
|
WORKDIR /ton
|
||||||
RUN mkdir /ton/build
|
RUN mkdir /ton/build
|
||||||
|
|
5
.github/script/arm64-22.04.Dockerfile
vendored
5
.github/script/arm64-22.04.Dockerfile
vendored
|
@ -2,12 +2,13 @@ FROM ubuntu:22.04
|
||||||
|
|
||||||
RUN apt update
|
RUN apt update
|
||||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
||||||
RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build
|
RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build pkg-config
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
ARG BRANCH
|
ARG BRANCH
|
||||||
RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git && cd ton && git checkout $BRANCH
|
ARG REPO
|
||||||
|
RUN git clone --recurse-submodules https://github.com/$REPO && cd ton && git checkout $BRANCH
|
||||||
|
|
||||||
WORKDIR /ton
|
WORKDIR /ton
|
||||||
RUN mkdir /ton/build
|
RUN mkdir /ton/build
|
||||||
|
|
56
.github/script/fift-func-wasm-build-ubuntu.sh
vendored
56
.github/script/fift-func-wasm-build-ubuntu.sh
vendored
|
@ -1,50 +1,48 @@
|
||||||
# The script build funcfift compiler to WASM
|
# The script builds funcfift compiler to WASM
|
||||||
|
|
||||||
# dependencies:
|
# 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
|
#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)
|
export CC=$(which clang)
|
||||||
export CXX=$(which clang++)
|
export CXX=$(which clang++)
|
||||||
export CCACHE_DISABLE=1
|
export CCACHE_DISABLE=1
|
||||||
|
|
||||||
|
cd ../..
|
||||||
|
rm -rf openssl zlib emsdk build
|
||||||
|
echo `pwd`
|
||||||
|
|
||||||
git clone https://github.com/openssl/openssl.git
|
git clone https://github.com/openssl/openssl.git
|
||||||
cd openssl
|
cd openssl
|
||||||
git checkout OpenSSL_1_1_1j
|
git checkout OpenSSL_1_1_1j
|
||||||
|
|
||||||
./config
|
./config
|
||||||
make -j4
|
make -j16
|
||||||
|
|
||||||
OPENSSL_DIR=`pwd`
|
OPENSSL_DIR=`pwd`
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
git clone https://github.com/madler/zlib.git
|
git clone https://github.com/madler/zlib.git
|
||||||
cd zlib
|
cd zlib
|
||||||
ZLIB_DIR=`pwd`
|
ZLIB_DIR=`pwd`
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# clone ton repo
|
|
||||||
git clone --recursive https://github.com/the-ton-tech/ton-blockchain.git
|
|
||||||
|
|
||||||
# only to generate auto-block.cpp
|
|
||||||
|
|
||||||
cd ton-blockchain
|
|
||||||
git pull
|
|
||||||
git checkout 1566a23b2bece49fd1de9ab2f35e88297d22829f
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -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 ..
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -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 ..
|
||||||
make -j4 fift
|
|
||||||
|
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 *
|
rm -rf *
|
||||||
|
|
||||||
cd ../..
|
cd ..
|
||||||
|
|
||||||
git clone https://github.com/emscripten-core/emsdk.git
|
git clone https://github.com/emscripten-core/emsdk.git
|
||||||
cd emsdk
|
cd emsdk
|
||||||
./emsdk install latest
|
./emsdk install 3.1.19
|
||||||
./emsdk activate latest
|
./emsdk activate 3.1.19
|
||||||
EMSDK_DIR=`pwd`
|
EMSDK_DIR=`pwd`
|
||||||
|
|
||||||
source $EMSDK_DIR/emsdk_env.sh
|
source $EMSDK_DIR/emsdk_env.sh
|
||||||
|
@ -55,7 +53,8 @@ export CCACHE_DISABLE=1
|
||||||
cd ../zlib
|
cd ../zlib
|
||||||
|
|
||||||
emconfigure ./configure --static
|
emconfigure ./configure --static
|
||||||
emmake make -j4
|
emmake make -j16
|
||||||
|
test $? -eq 0 || { echo "Can't compile zlib with emmake "; exit 1; }
|
||||||
ZLIB_DIR=`pwd`
|
ZLIB_DIR=`pwd`
|
||||||
|
|
||||||
cd ../openssl
|
cd ../openssl
|
||||||
|
@ -66,14 +65,13 @@ sed -i 's/CROSS_COMPILE=.*/CROSS_COMPILE=/g' Makefile
|
||||||
sed -i 's/-ldl//g' Makefile
|
sed -i 's/-ldl//g' Makefile
|
||||||
sed -i 's/-O3/-Os/g' Makefile
|
sed -i 's/-O3/-Os/g' Makefile
|
||||||
emmake make depend
|
emmake make depend
|
||||||
emmake make -j4
|
emmake make -j16
|
||||||
|
test $? -eq 0 || { echo "Can't compile OpenSSL with emmake "; exit 1; }
|
||||||
cd ../ton-blockchain
|
cd ../build
|
||||||
|
|
||||||
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="-pthread -sUSE_ZLIB=1" ..
|
|
||||||
|
|
||||||
|
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" ..
|
||||||
|
test $? -eq 0 || { echo "Can't configure TON with with emmake "; exit 1; }
|
||||||
cp -R ../crypto/smartcont ../crypto/fift/lib crypto
|
cp -R ../crypto/smartcont ../crypto/fift/lib crypto
|
||||||
|
|
||||||
emmake make -j4 funcfiftlib
|
emmake make -j16 funcfiftlib func fift tlbc emulator-emscripten
|
||||||
|
|
||||||
|
|
310
.github/workflows/create-release.yml
vendored
310
.github/workflows/create-release.yml
vendored
|
@ -11,42 +11,69 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Show all artifacts
|
- name: Download Linux x86-64 artifacts
|
||||||
run: |
|
|
||||||
mkdir artifacts
|
|
||||||
ls -lart artifacts
|
|
||||||
|
|
||||||
- name: Download Ubuntu x86-64 artifacts
|
|
||||||
uses: dawidd6/action-download-artifact@v2
|
uses: dawidd6/action-download-artifact@v2
|
||||||
with:
|
with:
|
||||||
workflow: ubuntu-compile.yml
|
workflow: ton-x86-64-linux.yml
|
||||||
path: artifacts
|
path: artifacts
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
skip_unpack: true
|
skip_unpack: true
|
||||||
|
|
||||||
- name: Download Ubuntu arm64 artifacts
|
- name: Download and unzip Linux x86-64 artifacts
|
||||||
uses: dawidd6/action-download-artifact@v2
|
uses: dawidd6/action-download-artifact@v2
|
||||||
with:
|
with:
|
||||||
workflow: docker-compile-ubuntu.yml
|
workflow: ton-x86-64-linux.yml
|
||||||
|
path: artifacts
|
||||||
|
workflow_conclusion: success
|
||||||
|
skip_unpack: false
|
||||||
|
|
||||||
|
# - name: Download Linux arm64 artifacts
|
||||||
|
# uses: dawidd6/action-download-artifact@v2
|
||||||
|
# with:
|
||||||
|
# workflow: ton-aarch64-linux.yml
|
||||||
|
# path: artifacts
|
||||||
|
# workflow_conclusion: success
|
||||||
|
# skip_unpack: true
|
||||||
|
#
|
||||||
|
# - name: Download and unzip Linux arm64 artifacts
|
||||||
|
# uses: dawidd6/action-download-artifact@v2
|
||||||
|
# with:
|
||||||
|
# workflow: ton-aarch64-linux.yml
|
||||||
|
# path: artifacts
|
||||||
|
# workflow_conclusion: success
|
||||||
|
# skip_unpack: false
|
||||||
|
|
||||||
|
- name: Download Mac x86-64 artifacts
|
||||||
|
uses: dawidd6/action-download-artifact@v2
|
||||||
|
with:
|
||||||
|
workflow: ton-x86-64-macos.yml
|
||||||
path: artifacts
|
path: artifacts
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
skip_unpack: true
|
skip_unpack: true
|
||||||
|
|
||||||
- name: Download MacOS 11.7 artifacts
|
- name: Download and unzip Mac x86-64 artifacts
|
||||||
uses: dawidd6/action-download-artifact@v2
|
uses: dawidd6/action-download-artifact@v2
|
||||||
with:
|
with:
|
||||||
workflow: macos-11.7-compile.yml
|
workflow: ton-x86-64-macos.yml
|
||||||
path: artifacts
|
path: artifacts
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
skip_unpack: true
|
skip_unpack: false
|
||||||
|
|
||||||
- name: Download MacOS 12.6 artifacts
|
# - name: Download Mac arm64 artifacts
|
||||||
uses: dawidd6/action-download-artifact@v2
|
# uses: dawidd6/action-download-artifact@v2
|
||||||
with:
|
# with:
|
||||||
workflow: macos-12.6-compile.yml
|
# workflow: ton-aarch64-macos.yml
|
||||||
path: artifacts
|
# path: artifacts
|
||||||
workflow_conclusion: success
|
# workflow_conclusion: success
|
||||||
skip_unpack: true
|
# skip_unpack: true
|
||||||
|
#
|
||||||
|
# - name: Download and unzip Mac arm64 artifacts
|
||||||
|
# uses: dawidd6/action-download-artifact@v2
|
||||||
|
# with:
|
||||||
|
# workflow: ton-aarch64-macos.yml
|
||||||
|
# path: artifacts
|
||||||
|
# workflow_conclusion: success
|
||||||
|
# skip_unpack: false
|
||||||
|
|
||||||
- name: Download Windows artifacts
|
- name: Download Windows artifacts
|
||||||
uses: dawidd6/action-download-artifact@v2
|
uses: dawidd6/action-download-artifact@v2
|
||||||
|
@ -56,10 +83,27 @@ jobs:
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
skip_unpack: true
|
skip_unpack: true
|
||||||
|
|
||||||
|
- name: Download and unzip Windows artifacts
|
||||||
|
uses: dawidd6/action-download-artifact@v2
|
||||||
|
with:
|
||||||
|
workflow: win-2019-compile.yml
|
||||||
|
path: artifacts
|
||||||
|
workflow_conclusion: success
|
||||||
|
skip_unpack: false
|
||||||
|
|
||||||
|
- name: Download WASM artifacts
|
||||||
|
uses: dawidd6/action-download-artifact@v2
|
||||||
|
with:
|
||||||
|
workflow: ton-wasm-emscripten.yml
|
||||||
|
path: artifacts
|
||||||
|
workflow_conclusion: success
|
||||||
|
skip_unpack: true
|
||||||
|
|
||||||
- name: Show all artifacts
|
- name: Show all artifacts
|
||||||
run: |
|
run: |
|
||||||
tree artifacts
|
tree artifacts
|
||||||
|
|
||||||
|
|
||||||
# create release
|
# create release
|
||||||
|
|
||||||
- name: Read Changelog.md and use it as a body of new release
|
- name: Read Changelog.md and use it as a body of new release
|
||||||
|
@ -79,7 +123,7 @@ jobs:
|
||||||
- name: Get registration token
|
- name: Get registration token
|
||||||
id: getRegToken
|
id: getRegToken
|
||||||
run: |
|
run: |
|
||||||
curl -X POST -H \"Accept: application/vnd.github+json\" -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/neodix42/HardTestDevelopment/actions/runners/registration-token
|
curl -X POST -H \"Accept: application/vnd.github+json\" -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/ton-blockchain/ton/actions/runners/registration-token
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
|
@ -94,74 +138,250 @@ jobs:
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
|
# upload
|
||||||
|
|
||||||
|
# win
|
||||||
|
|
||||||
- name: Upload Windows 2019 artifacts
|
- name: Upload Windows 2019 artifacts
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: artifacts/ton-win-binaries.zip
|
file: artifacts/ton-win-binaries.zip
|
||||||
asset_name: ton-windows-2019-x86-64.zip
|
asset_name: ton-win-x86-64.zip
|
||||||
tag: v${{ steps.date.outputs.date }}
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
- name: Upload MacOS 11.7 x86-64 artifacts
|
- name: Upload Windows 2019 single artifact - fift
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: artifacts/ton-macos-11.7.zip
|
file: artifacts/ton-win-binaries/fift.exe
|
||||||
asset_name: ton-macos-11.7-x86-64.zip
|
asset_name: fift.exe
|
||||||
tag: v${{ steps.date.outputs.date }}
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
- name: Upload MacOS 12.6 x86-64 artifacts
|
- name: Upload Windows 2019 single artifact - func
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: artifacts/ton-macos-12.6.zip
|
file: artifacts/ton-win-binaries/func.exe
|
||||||
asset_name: ton-macos-12.6-x86-64.zip
|
asset_name: func.exe
|
||||||
tag: v${{ steps.date.outputs.date }}
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
- name: Upload Ubuntu 18.04 x86-64 artifacts
|
- name: Upload Windows 2019 single artifact - lite-client
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: artifacts/ton-binaries-ubuntu-18.04.zip
|
file: artifacts/ton-win-binaries/lite-client.exe
|
||||||
asset_name: ton-ubuntu-18.04-x86-64.zip
|
asset_name: lite-client.exe
|
||||||
tag: v${{ steps.date.outputs.date }}
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
- name: Upload Ubuntu 20.04 x86-64 artifacts
|
- name: Upload Windows 2019 single artifact - rldp-http-proxy
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: artifacts/ton-binaries-ubuntu-20.04.zip
|
file: artifacts/ton-win-binaries/rldp-http-proxy.exe
|
||||||
asset_name: ton-ubuntu-20.04-x86-64.zip
|
asset_name: rldp-http-proxy.exe
|
||||||
tag: v${{ steps.date.outputs.date }}
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
- name: Upload Ubuntu 22.04 x86-64 artifacts
|
- name: Upload Windows 2019 single artifact - http-proxy
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: artifacts/ton-binaries-ubuntu-22.04.zip
|
file: artifacts/ton-win-binaries/http-proxy.exe
|
||||||
asset_name: ton-ubuntu-22.04-x86-64.zip
|
asset_name: http-proxy.exe
|
||||||
tag: v${{ steps.date.outputs.date }}
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
- name: Upload Ubuntu 18.04 arm64 artifacts
|
- name: Upload Windows 2019 single artifact - storage-daemon-cli
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: artifacts/ton-ubuntu-18.04-arm64.zip
|
file: artifacts/ton-win-binaries/storage-daemon-cli.exe
|
||||||
asset_name: ton-ubuntu-18.04-arm64.zip
|
asset_name: storage-daemon-cli.exe
|
||||||
tag: v${{ steps.date.outputs.date }}
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
- name: Upload Ubuntu 20.04 arm64 artifacts
|
- name: Upload Windows 2019 single artifact - tonlibjson
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: artifacts/ton-ubuntu-20.04-arm64.zip
|
file: artifacts/ton-win-binaries/tonlibjson.dll
|
||||||
asset_name: ton-ubuntu-20.04-arm64.zip
|
asset_name: tonlibjson.dll
|
||||||
tag: v${{ steps.date.outputs.date }}
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
- name: Upload Ubuntu 22.04 arm64 artifacts
|
- name: Upload Windows 2019 single artifact - tonlib-cli
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: artifacts/ton-ubuntu-22.04-arm64.zip
|
file: artifacts/ton-win-binaries/tonlib-cli.exe
|
||||||
asset_name: ton-ubuntu-22.04-arm64.zip
|
asset_name: tonlib-cli.exe
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
# mac x86-64
|
||||||
|
|
||||||
|
- name: Upload Mac x86-64 artifacts
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-macos-binaries.zip
|
||||||
|
asset_name: ton-mac-x86-64.zip
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Mac x86-64 single artifact - fift
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-macos-binaries/fift
|
||||||
|
asset_name: fift-mac-x86-64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Mac x86-64 single artifact - func
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-macos-binaries/func
|
||||||
|
asset_name: func-mac-x86-64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Mac x86-64 single artifact - lite-client
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-macos-binaries/lite-client
|
||||||
|
asset_name: lite-client-mac-x86-64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Mac x86-64 single artifact - rldp-http-proxy
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-macos-binaries/rldp-http-proxy
|
||||||
|
asset_name: rldp-http-proxy-mac-x86-64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Mac x86-64 single artifact - http-proxy
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-macos-binaries/http-proxy
|
||||||
|
asset_name: http-proxy-mac-x86-64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Mac x86-64 single artifact - storage-daemon-cli
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-macos-binaries/storage-daemon-cli
|
||||||
|
asset_name: storage-daemon-cli-mac-x86-64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Mac x86-64 single artifact - tonlibjson
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-macos-binaries/libtonlibjson.dylib
|
||||||
|
asset_name: tonlibjson-mac-x86-64.dylib
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Mac x86-64 single artifact - tonlib-cli
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-macos-binaries/tonlib-cli
|
||||||
|
asset_name: tonlib-cli-mac-x86-64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
# linux x86-64
|
||||||
|
|
||||||
|
- name: Upload Linux x86-64 artifacts
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-linux-binaries.zip
|
||||||
|
asset_name: ton-linux-x86_64.zip
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Linux x86-64 single artifact - fift
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-linux-binaries/fift
|
||||||
|
asset_name: fift-linux-x86_64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Linux x86-64 single artifact - func
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-linux-binaries/func
|
||||||
|
asset_name: func-linux-x86_64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Linux x86-64 single artifact - lite-client
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-linux-binaries/lite-client
|
||||||
|
asset_name: lite-client-linux-x86_64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Linux x86-64 single artifact - rldp-http-proxy
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-linux-binaries/rldp-http-proxy
|
||||||
|
asset_name: rldp-http-proxy-linux-x86_64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Linux x86-64 single artifact - http-proxy
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-linux-binaries/http-proxy
|
||||||
|
asset_name: http-proxy-linux-x86_64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Linux x86-64 single artifact - storage-daemon-cli
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-linux-binaries/storage-daemon-cli
|
||||||
|
asset_name: storage-daemon-cli-linux-x86_64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Linux x86-64 single artifact - tonlibjson
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-linux-binaries/libtonlibjson.so.0.5
|
||||||
|
asset_name: tonlibjson-linux-x86_64.so
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload Linux x86-64 single artifact - tonlib-cli
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-x86_64-linux-binaries/tonlib-cli
|
||||||
|
asset_name: tonlib-cli-linux-x86_64
|
||||||
|
tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
# - name: Upload Linux arm64 artifacts
|
||||||
|
# uses: svenstaro/upload-release-action@v2
|
||||||
|
# with:
|
||||||
|
# repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# file: artifacts/ton-aarch64-linux-binaries.zip
|
||||||
|
# asset_name: ton-linux-arm64.zip
|
||||||
|
# tag: v${{ steps.date.outputs.date }}
|
||||||
|
#
|
||||||
|
# - name: Upload Mac arm64 artifacts
|
||||||
|
# uses: svenstaro/upload-release-action@v2
|
||||||
|
# with:
|
||||||
|
# repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# file: artifacts/ton-aarch64-macos-binaries
|
||||||
|
# asset_name: ton-mac-arm64.zip
|
||||||
|
# tag: v${{ steps.date.outputs.date }}
|
||||||
|
|
||||||
|
- name: Upload WASM artifacts
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: artifacts/ton-wasm-binaries.zip
|
||||||
|
asset_name: ton-wasm-binaries.zip
|
||||||
tag: v${{ steps.date.outputs.date }}
|
tag: v${{ steps.date.outputs.date }}
|
4
.github/workflows/docker-compile-ubuntu.yml
vendored
4
.github/workflows/docker-compile-ubuntu.yml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
||||||
max-parallel: 3
|
max-parallel: 3
|
||||||
matrix:
|
matrix:
|
||||||
arch: [arm64]
|
arch: [arm64]
|
||||||
ver: [22.04, 18.04, 20.04 ]
|
ver: [22.04, 20.04 ]
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
|
@ -33,7 +33,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir build-${{matrix.ver}}-${{matrix.arch}}
|
mkdir build-${{matrix.ver}}-${{matrix.arch}}
|
||||||
|
|
||||||
docker buildx build --build-arg BRANCH=${{ steps.vars.outputs.short_ref }} --platform=linux/${{matrix.arch}} --progress=plain --load . -t build-${{matrix.ver}}-${{matrix.arch}} -f .github/script/${{matrix.arch}}-${{matrix.ver}}.Dockerfile
|
docker buildx build --build-arg REPO=${{ github.repository }} --build-arg BRANCH=${{ steps.vars.outputs.short_ref }} --platform=linux/${{matrix.arch}} --progress=plain --load . -t build-${{matrix.ver}}-${{matrix.arch}} -f .github/script/${{matrix.arch}}-${{matrix.ver}}.Dockerfile
|
||||||
container_id=$(docker create --platform=linux/${{matrix.arch}} build-${{matrix.ver}}-${{matrix.arch}})
|
container_id=$(docker create --platform=linux/${{matrix.arch}} build-${{matrix.ver}}-${{matrix.arch}})
|
||||||
docker cp $container_id:/ton/build/dht-server/dht-server build-${{matrix.ver}}-${{matrix.arch}}/
|
docker cp $container_id:/ton/build/dht-server/dht-server build-${{matrix.ver}}-${{matrix.arch}}/
|
||||||
docker cp -a $container_id:/ton/build/validator-engine/validator-engine build-${{matrix.ver}}-${{matrix.arch}}/
|
docker cp -a $container_id:/ton/build/validator-engine/validator-engine build-${{matrix.ver}}-${{matrix.arch}}/
|
||||||
|
|
10
.github/workflows/macos-11.7-compile.yml
vendored
10
.github/workflows/macos-11.7-compile.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
||||||
- name: Build all
|
- name: Build all
|
||||||
run: |
|
run: |
|
||||||
export NONINTERACTIVE=1
|
export NONINTERACTIVE=1
|
||||||
brew install ninja libmicrohttpd
|
brew install ninja libmicrohttpd pkg-config
|
||||||
rootPath=`pwd`
|
rootPath=`pwd`
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
@ -51,10 +51,18 @@ jobs:
|
||||||
cp build/utils/generate-random-id artifacts/
|
cp build/utils/generate-random-id artifacts/
|
||||||
cp build/utils/json2tlo artifacts/
|
cp build/utils/json2tlo artifacts/
|
||||||
cp build/adnl/adnl-proxy artifacts/
|
cp build/adnl/adnl-proxy artifacts/
|
||||||
|
chmod +x artifacts/*
|
||||||
rsync -r crypto/smartcont artifacts/
|
rsync -r crypto/smartcont artifacts/
|
||||||
rsync -r crypto/fift/lib artifacts/
|
rsync -r crypto/fift/lib artifacts/
|
||||||
ls -laRt 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
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
|
|
10
.github/workflows/macos-12.6-compile.yml
vendored
10
.github/workflows/macos-12.6-compile.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
||||||
- name: Build all
|
- name: Build all
|
||||||
run: |
|
run: |
|
||||||
export NONINTERACTIVE=1
|
export NONINTERACTIVE=1
|
||||||
brew install ninja libmicrohttpd
|
brew install ninja libmicrohttpd pkg-config
|
||||||
rootPath=`pwd`
|
rootPath=`pwd`
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
@ -51,10 +51,18 @@ jobs:
|
||||||
cp build/utils/generate-random-id artifacts/
|
cp build/utils/generate-random-id artifacts/
|
||||||
cp build/utils/json2tlo artifacts/
|
cp build/utils/json2tlo artifacts/
|
||||||
cp build/adnl/adnl-proxy artifacts/
|
cp build/adnl/adnl-proxy artifacts/
|
||||||
|
chmod +x artifacts/*
|
||||||
rsync -r crypto/smartcont artifacts/
|
rsync -r crypto/smartcont artifacts/
|
||||||
rsync -r crypto/fift/lib artifacts/
|
rsync -r crypto/fift/lib artifacts/
|
||||||
ls -laRt 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
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
|
|
48
.github/workflows/ton-aarch64-linux.yml
vendored
Normal file
48
.github/workflows/ton-aarch64-linux.yml
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
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/
|
||||||
|
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-aarch64-linux-binaries
|
||||||
|
path: artifacts
|
45
.github/workflows/ton-aarch64-macos.yml
vendored
Normal file
45
.github/workflows/ton-aarch64-macos.yml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
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 -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-aarch64-macos-binaries
|
||||||
|
path: artifacts
|
|
@ -5,7 +5,7 @@ on: [push,workflow_dispatch,workflow_call]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
40
.github/workflows/ton-wasm-emscripten.yml
vendored
Normal file
40
.github/workflows/ton-wasm-emscripten.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
- 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
|
47
.github/workflows/ton-x86-64-linux.yml
vendored
Normal file
47
.github/workflows/ton-x86-64-linux.yml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
name: "TON x86_64 Linux binaries"
|
||||||
|
|
||||||
|
on: [push,workflow_dispatch,workflow_call]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y apt-utils
|
||||||
|
|
||||||
|
- 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.x86_64-linux.ton-oldglibc_staticbinaries --print-build-logs --system x86_64-linux -o result-x86_64
|
||||||
|
|
||||||
|
- name: Copy binaries
|
||||||
|
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/
|
||||||
|
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-x86_64-linux-binaries
|
||||||
|
path: artifacts
|
43
.github/workflows/ton-x86-64-macos.yml
vendored
Normal file
43
.github/workflows/ton-x86-64-macos.yml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
name: "TON x86_64 macOS binaries"
|
||||||
|
|
||||||
|
on: [push,workflow_dispatch,workflow_call]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: macos-12
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- 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.x86_64-darwin.ton-staticbin-dylib --print-build-logs -o result-x86_64-darwin
|
||||||
|
|
||||||
|
- name: Copy binaries
|
||||||
|
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 -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-x86_64-macos-binaries
|
||||||
|
path: artifacts
|
|
@ -1,11 +1,11 @@
|
||||||
name: Ubuntu 18.04 Compile
|
name: Ubuntu 22.04 Compile
|
||||||
|
|
||||||
on: [push,workflow_dispatch,workflow_call]
|
on: [push,workflow_dispatch,workflow_call]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
@ -36,9 +36,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir artifacts
|
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 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 artifacts
|
||||||
|
chmod +x artifacts/*
|
||||||
cp -R crypto/smartcont artifacts/
|
cp -R crypto/smartcont artifacts/
|
||||||
cp -R crypto/fift/lib 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
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
11
.github/workflows/ubuntu-compile.yml
vendored
11
.github/workflows/ubuntu-compile.yml
vendored
|
@ -7,7 +7,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
|
os: [ubuntu-20.04, ubuntu-22.04]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -39,8 +39,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir artifacts-${{ matrix.os }}
|
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 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 artifacts-${{ matrix.os }}
|
||||||
|
chmod +x artifacts-${{ matrix.os }}/*
|
||||||
cp -R crypto/smartcont artifacts-${{ matrix.os }}
|
cp -R crypto/smartcont artifacts-${{ matrix.os }}
|
||||||
cp -R crypto/fift/lib 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
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
|
|
10
.github/workflows/win-2019-compile.yml
vendored
10
.github/workflows/win-2019-compile.yml
vendored
|
@ -28,7 +28,10 @@ jobs:
|
||||||
path: zlib
|
path: zlib
|
||||||
|
|
||||||
- name: Setup msbuild.exe
|
- name: Setup msbuild.exe
|
||||||
uses: microsoft/setup-msbuild@v1.0.2
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
|
||||||
|
- name: Install Pkg-config Lite
|
||||||
|
run: choco install pkgconfiglite
|
||||||
|
|
||||||
- name: Compile zlib Win64
|
- name: Compile zlib Win64
|
||||||
run: |
|
run: |
|
||||||
|
@ -68,8 +71,7 @@ jobs:
|
||||||
|
|
||||||
- name: Check if validator-engine.exe exists
|
- name: Check if validator-engine.exe exists
|
||||||
run: |
|
run: |
|
||||||
set root=%cd%
|
copy %cd%\build\validator-engine\Release\validator-engine.exe test
|
||||||
copy %root%\build\validator-engine\Release\validator-engine.exe test
|
|
||||||
|
|
||||||
- name: Find & copy binaries
|
- name: Find & copy binaries
|
||||||
run: |
|
run: |
|
||||||
|
@ -77,7 +79,7 @@ jobs:
|
||||||
mkdir artifacts\smartcont
|
mkdir artifacts\smartcont
|
||||||
mkdir artifacts\lib
|
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\Release\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) do copy %%I artifacts\
|
for %%I in (build\storage\storage-daemon\storage-daemon.exe build\storage\storage-daemon\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) do copy %%I artifacts\
|
||||||
xcopy /e /k /h /i crypto\smartcont artifacts\smartcont
|
xcopy /e /k /h /i crypto\smartcont artifacts\smartcont
|
||||||
xcopy /e /k /h /i crypto\fift\lib artifacts\lib
|
xcopy /e /k /h /i crypto\fift\lib artifacts\lib
|
||||||
|
|
||||||
|
|
|
@ -20,19 +20,6 @@ find_library(
|
||||||
set(MHD_INCLUDE_DIRS ${MHD_INCLUDE_DIR})
|
set(MHD_INCLUDE_DIRS ${MHD_INCLUDE_DIR})
|
||||||
set(MHD_LIBRARIES ${MHD_LIBRARY})
|
set(MHD_LIBRARIES ${MHD_LIBRARY})
|
||||||
|
|
||||||
# debug library on windows
|
|
||||||
# same naming convention as in qt (appending debug library with d)
|
|
||||||
# boost is using the same "hack" as us with "optimized" and "debug"
|
|
||||||
# official MHD project actually uses _d suffix
|
|
||||||
if (MSVC)
|
|
||||||
find_library(
|
|
||||||
MHD_LIBRARY_DEBUG
|
|
||||||
NAMES microhttpd_d microhttpd-10_d libmicrohttpd_d libmicrohttpd-dll_d
|
|
||||||
DOC "mhd debug library"
|
|
||||||
)
|
|
||||||
set(MHD_LIBRARIES optimized ${MHD_LIBRARIES} debug ${MHD_LIBRARY_DEBUG})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(mhd DEFAULT_MSG MHD_INCLUDE_DIR MHD_LIBRARY)
|
find_package_handle_standard_args(MHD DEFAULT_MSG MHD_INCLUDE_DIR MHD_LIBRARY)
|
||||||
mark_as_advanced(MHD_INCLUDE_DIR MHD_LIBRARY)
|
mark_as_advanced(MHD_INCLUDE_DIR MHD_LIBRARY)
|
||||||
|
|
|
@ -108,7 +108,8 @@ set(TON_ARCH "native" CACHE STRING "Architecture, will be passed to -march=")
|
||||||
#BEGIN M1 support
|
#BEGIN M1 support
|
||||||
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
|
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
|
||||||
|
|
||||||
if ((ARCHITECTURE MATCHES "arm64") AND (CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
|
if ((ARCHITECTURE MATCHES "arm64") AND (CMAKE_SYSTEM_NAME STREQUAL "Darwin") AND
|
||||||
|
(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)) # only clang 13+ supports cpu=apple-m1
|
||||||
set(TON_ARCH "apple-m1")
|
set(TON_ARCH "apple-m1")
|
||||||
endif()
|
endif()
|
||||||
#END M1 support
|
#END M1 support
|
||||||
|
@ -135,7 +136,16 @@ set(CRC32C_BUILD_BENCHMARKS OFF CACHE BOOL "Build CRC32C's benchmarks")
|
||||||
set(CRC32C_USE_GLOG OFF CACHE BOOL "Build CRC32C's tests with Google Logging")
|
set(CRC32C_USE_GLOG OFF CACHE BOOL "Build CRC32C's tests with Google Logging")
|
||||||
set(CRC32C_INSTALL OFF CACHE BOOL "Install CRC32C's header and library")
|
set(CRC32C_INSTALL OFF CACHE BOOL "Install CRC32C's header and library")
|
||||||
message("Add crc32c")
|
message("Add crc32c")
|
||||||
add_subdirectory(third-party/crc32c EXCLUDE_FROM_ALL)
|
if (NOT MSVC)
|
||||||
|
set(OLD_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||||
|
# fix aarch64 build @ crc32c/src/crc32c_arm64_linux_check.h
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=address")
|
||||||
|
add_subdirectory(third-party/crc32c EXCLUDE_FROM_ALL)
|
||||||
|
set(CMAKE_CXX_FLAGS ${OLD_CMAKE_CXX_FLAGS})
|
||||||
|
unset(OLD_CMAKE_CXX_FLAGS)
|
||||||
|
else()
|
||||||
|
add_subdirectory(third-party/crc32c EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
set(CRC32C_FOUND 1)
|
set(CRC32C_FOUND 1)
|
||||||
|
|
||||||
if (TON_USE_ROCKSDB)
|
if (TON_USE_ROCKSDB)
|
||||||
|
@ -198,6 +208,7 @@ include(CheckCXXCompilerFlag)
|
||||||
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
if (TON_ARCH AND NOT MSVC)
|
if (TON_ARCH AND NOT MSVC)
|
||||||
|
|
|
@ -99,6 +99,8 @@ target_link_libraries(adnl-pong PUBLIC tdactor ton_crypto tl_api tdnet common
|
||||||
add_library(adnltest STATIC ${ADNL_TEST_SOURCE})
|
add_library(adnltest STATIC ${ADNL_TEST_SOURCE})
|
||||||
target_include_directories(adnltest PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>)
|
target_include_directories(adnltest PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>)
|
||||||
target_link_libraries(adnltest PUBLIC adnl )
|
target_link_libraries(adnltest PUBLIC adnl )
|
||||||
|
|
||||||
|
install(TARGETS adnl-proxy RUNTIME DESTINATION bin)
|
||||||
endif()
|
endif()
|
||||||
#END internal
|
#END internal
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,28 @@
|
||||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
|
option(NIX "Use \"ON\" for a static build." OFF)
|
||||||
|
|
||||||
find_package(MHD)
|
set(BLOCHAIN_EXPLORER_SOURCE
|
||||||
|
|
||||||
if (MHD_FOUND)
|
|
||||||
|
|
||||||
set(BLOCHAIN_EXPLORER_SOURCE
|
|
||||||
blockchain-explorer.cpp
|
blockchain-explorer.cpp
|
||||||
blockchain-explorer.hpp
|
blockchain-explorer.hpp
|
||||||
blockchain-explorer-http.cpp
|
blockchain-explorer-http.cpp
|
||||||
blockchain-explorer-http.hpp
|
blockchain-explorer-http.hpp
|
||||||
blockchain-explorer-query.cpp
|
blockchain-explorer-query.cpp
|
||||||
blockchain-explorer-query.hpp
|
blockchain-explorer-query.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(blockchain-explorer ${BLOCHAIN_EXPLORER_SOURCE})
|
add_executable(blockchain-explorer ${BLOCHAIN_EXPLORER_SOURCE})
|
||||||
|
|
||||||
|
if (NIX)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(MHD libmicrohttpd)
|
||||||
|
target_include_directories(blockchain-explorer PUBLIC ${MHD_INCLUDE_DIRS} ${MHD_STATIC_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(blockchain-explorer tdutils tdactor adnllite tl_lite_api tl-lite-utils ton_crypto ton_block ${MHD_LIBRARIES} ${MHD_STATIC_LIBRARIES})
|
||||||
|
else()
|
||||||
|
find_package(MHD)
|
||||||
target_include_directories(blockchain-explorer PUBLIC ${MHD_INCLUDE_DIRS})
|
target_include_directories(blockchain-explorer PUBLIC ${MHD_INCLUDE_DIRS})
|
||||||
target_link_libraries(blockchain-explorer tdutils tdactor adnllite tl_lite_api tl-lite-utils
|
target_link_libraries(blockchain-explorer tdutils tdactor adnllite tl_lite_api tl-lite-utils ton_crypto ton_block ${MHD_LIBRARIES})
|
||||||
ton_crypto ton_block ${MHD_LIBRARY})
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
install(TARGETS blockchain-explorer RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
|
|
|
@ -488,6 +488,6 @@ if (WINGETOPT_FOUND)
|
||||||
target_link_libraries_system(test-weight-distr wingetopt)
|
target_link_libraries_system(test-weight-distr wingetopt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS fift func pow-miner RUNTIME DESTINATION bin)
|
install(TARGETS fift func create-state tlbc RUNTIME DESTINATION bin)
|
||||||
install(DIRECTORY fift/lib/ DESTINATION lib/fift)
|
install(DIRECTORY fift/lib/ DESTINATION lib/fift)
|
||||||
install(DIRECTORY smartcont DESTINATION share/ton)
|
install(DIRECTORY smartcont DESTINATION share/ton)
|
||||||
|
|
|
@ -19,7 +19,7 @@ set(EMULATOR_SOURCE
|
||||||
)
|
)
|
||||||
|
|
||||||
set(EMULATOR_EMSCRIPTEN_SOURCE
|
set(EMULATOR_EMSCRIPTEN_SOURCE
|
||||||
transaction-emscripten.cpp
|
emulator-emscripten.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
|
@ -27,7 +27,7 @@ include(GenerateExportHeader)
|
||||||
add_library(emulator_static STATIC ${EMULATOR_STATIC_SOURCE})
|
add_library(emulator_static STATIC ${EMULATOR_STATIC_SOURCE})
|
||||||
target_link_libraries(emulator_static PUBLIC ton_crypto ton_block smc-envelope)
|
target_link_libraries(emulator_static PUBLIC ton_crypto ton_block smc-envelope)
|
||||||
|
|
||||||
add_library(emulator SHARED ${EMULATOR_SOURCE} ${EMULATOR_HEADERS})
|
add_library(emulator STATIC ${EMULATOR_SOURCE} ${EMULATOR_HEADERS})
|
||||||
target_link_libraries(emulator PUBLIC emulator_static)
|
target_link_libraries(emulator PUBLIC emulator_static)
|
||||||
generate_export_header(emulator EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/emulator_export.h)
|
generate_export_header(emulator EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/emulator_export.h)
|
||||||
target_include_directories(emulator PUBLIC
|
target_include_directories(emulator PUBLIC
|
||||||
|
|
|
@ -34,7 +34,7 @@ add_library( # Sets the name of the library.
|
||||||
list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/crypto/${ANDROID_ARCH_NAME}")
|
list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/crypto/${ANDROID_ARCH_NAME}")
|
||||||
set(TON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
set(TON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||||
add_subdirectory(${TON_DIR} ton EXCLUDE_FROM_ALL)
|
add_subdirectory(${TON_DIR} ton EXCLUDE_FROM_ALL)
|
||||||
target_link_libraries(native-lib tonlibjson_static)
|
target_link_libraries(native-lib tonlibjson)
|
||||||
target_link_libraries(native-lib tonlib)
|
target_link_libraries(native-lib tonlib)
|
||||||
|
|
||||||
#target_sources(native-lib PRIVATE ${ALL_TEST_SOURCE})
|
#target_sources(native-lib PRIVATE ${ALL_TEST_SOURCE})
|
||||||
|
|
|
@ -33,7 +33,7 @@ mkdir -p build-$ARCH
|
||||||
cd build-$ARCH
|
cd build-$ARCH
|
||||||
|
|
||||||
|
|
||||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -GNinja -DANDROID_ABI=${ABI} -DOPENSSL_ROOT_DIR=${OPENSSL_DIR}/${ARCH} -DTON_ARCH="" -DTON_ONLY_TONLIB=ON || exit 1
|
cmake .. -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -GNinja -DANDROID_ABI=${ABI} -DOPENSSL_ROOT_DIR=${OPENSSL_DIR}/${ARCH} -DTON_ARCH="" -DTON_ONLY_TONLIB=ON -DBUILD_SHARED_LIBS=OFF || exit 1
|
||||||
ninja native-lib || exit 1
|
ninja native-lib || exit 1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
pushd .
|
pushd .
|
||||||
mkdir -p build_native
|
mkdir -p build_native
|
||||||
cd build_native
|
cd build_native
|
||||||
cmake -DTON_ONLY_TONLIB=ON .. || exit 1
|
cmake -DTON_ONLY_TONLIB=ON -DBUILD_SHARED_LIBS=OFF .. || exit 1
|
||||||
cmake --build . --target prepare_cross_compiling || exit 2
|
cmake --build . --target prepare_cross_compiling || exit 2
|
||||||
#cmake --build . --target tl_generate_java || exit 1
|
#cmake --build . --target tl_generate_java || exit 1
|
||||||
popd
|
popd
|
||||||
|
|
76
flake.lock
Normal file
76
flake.lock
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1650374568,
|
||||||
|
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1652776076,
|
||||||
|
"narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-stable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1659445012,
|
||||||
|
"narHash": "sha256-n8/7npmp3hLbPSTRHPW8EPO8qh9vJ10RgkRM3Ve4vfc=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "a9f66ae640146ac16b6e33d2359e9171b27b0993",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-22.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-trunk": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1659597264,
|
||||||
|
"narHash": "sha256-aI/r4XEZwMJnuDjIMnSiDm34vVXP6TPaWgqPIF/65SI=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2b22614150a727a8aeedc10395dbd2ff6430841b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
|
"nixpkgs-trunk": "nixpkgs-trunk"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
137
flake.nix
Normal file
137
flake.nix
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.05";
|
||||||
|
nixpkgs-trunk.url = "github:nixos/nixpkgs";
|
||||||
|
flake-compat = {
|
||||||
|
url = "github:edolstra/flake-compat";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs-stable, nixpkgs-trunk, flake-compat, flake-utils }:
|
||||||
|
let
|
||||||
|
ton = { host, pkgs ? host, stdenv ? pkgs.stdenv, staticGlibc ? false
|
||||||
|
, staticMusl ? false, staticExternalDeps ? staticGlibc }:
|
||||||
|
with host.lib;
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "ton";
|
||||||
|
version = "dev";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
nativeBuildInputs = with host;
|
||||||
|
[ cmake ninja pkg-config git ] ++
|
||||||
|
optionals stdenv.isLinux [ dpkg rpm createrepo_c pacman ];
|
||||||
|
buildInputs = with pkgs;
|
||||||
|
# at some point nixpkgs' pkgsStatic will build with static glibc
|
||||||
|
# then we can skip these manual overrides
|
||||||
|
# and switch between pkgsStatic and pkgsStatic.pkgsMusl for static glibc and musl builds
|
||||||
|
if !staticExternalDeps then [
|
||||||
|
openssl_1_1
|
||||||
|
zlib
|
||||||
|
libmicrohttpd
|
||||||
|
] else
|
||||||
|
[
|
||||||
|
(openssl_1_1.override { static = true; }).dev
|
||||||
|
(zlib.override { shared = false; }).dev
|
||||||
|
pkgsStatic.libmicrohttpd.dev
|
||||||
|
] ++ optional staticGlibc glibc.static;
|
||||||
|
|
||||||
|
cmakeFlags = [ "-DTON_USE_ABSEIL=OFF" "-DNIX=ON" ] ++ optionals staticMusl [
|
||||||
|
"-DCMAKE_CROSSCOMPILING=OFF" # pkgsStatic sets cross
|
||||||
|
] ++ optionals (staticGlibc || staticMusl) [
|
||||||
|
"-DCMAKE_LINK_SEARCH_START_STATIC=ON"
|
||||||
|
"-DCMAKE_LINK_SEARCH_END_STATIC=ON"
|
||||||
|
];
|
||||||
|
|
||||||
|
LDFLAGS = optional staticExternalDeps (concatStringsSep " " [
|
||||||
|
(optionalString stdenv.cc.isGNU "-static-libgcc")
|
||||||
|
"-static-libstdc++"
|
||||||
|
]);
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
moveToOutput bin "$bin"
|
||||||
|
'';
|
||||||
|
|
||||||
|
outputs = [ "bin" "out" ];
|
||||||
|
};
|
||||||
|
hostPkgs = system:
|
||||||
|
import nixpkgs-stable {
|
||||||
|
inherit system;
|
||||||
|
overlays = [
|
||||||
|
(self: super: {
|
||||||
|
zchunk = nixpkgs-trunk.legacyPackages.${system}.zchunk;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in with flake-utils.lib;
|
||||||
|
(nixpkgs-stable.lib.recursiveUpdate
|
||||||
|
(eachSystem (with system; [ x86_64-linux aarch64-linux ]) (system:
|
||||||
|
let
|
||||||
|
host = hostPkgs system;
|
||||||
|
# look out for https://github.com/NixOS/nixpkgs/issues/129595 for progress on better infra for this
|
||||||
|
#
|
||||||
|
# nixos 19.09 ships with glibc 2.27
|
||||||
|
# we could also just override glibc source to a particular release
|
||||||
|
# but then we'd need to port patches as well
|
||||||
|
nixos1909 = (import (builtins.fetchTarball {
|
||||||
|
url = "https://channels.nixos.org/nixos-19.09/nixexprs.tar.xz";
|
||||||
|
sha256 = "1vp1h2gkkrckp8dzkqnpcc6xx5lph5d2z46sg2cwzccpr8ay58zy";
|
||||||
|
}) { inherit system; });
|
||||||
|
glibc227 = nixos1909.glibc // { pname = "glibc"; };
|
||||||
|
stdenv227 = let
|
||||||
|
cc = host.wrapCCWith {
|
||||||
|
cc = nixos1909.buildPackages.gcc-unwrapped;
|
||||||
|
libc = glibc227;
|
||||||
|
bintools = host.binutils.override { libc = glibc227; };
|
||||||
|
};
|
||||||
|
in (host.overrideCC host.stdenv cc);
|
||||||
|
in rec {
|
||||||
|
packages = rec {
|
||||||
|
ton-normal = ton { inherit host; };
|
||||||
|
ton-static = ton {
|
||||||
|
inherit host;
|
||||||
|
stdenv = host.makeStatic host.stdenv;
|
||||||
|
staticGlibc = true;
|
||||||
|
};
|
||||||
|
ton-musl =
|
||||||
|
let pkgs = nixpkgs-stable.legacyPackages.${system}.pkgsStatic;
|
||||||
|
in ton {
|
||||||
|
inherit host;
|
||||||
|
inherit pkgs;
|
||||||
|
stdenv =
|
||||||
|
pkgs.gcc12Stdenv; # doesn't build on aarch64-linux w/default GCC 9
|
||||||
|
staticMusl = true;
|
||||||
|
};
|
||||||
|
ton-oldglibc = (ton {
|
||||||
|
inherit host;
|
||||||
|
stdenv = stdenv227;
|
||||||
|
staticExternalDeps = true;
|
||||||
|
});
|
||||||
|
ton-oldglibc_staticbinaries = host.symlinkJoin {
|
||||||
|
name = "ton";
|
||||||
|
paths = [ ton-musl.bin ton-oldglibc.out ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
devShells.default =
|
||||||
|
host.mkShell { inputsFrom = [ packages.ton-normal ]; };
|
||||||
|
})) (eachSystem (with system; [ x86_64-darwin aarch64-darwin ]) (system:
|
||||||
|
let host = hostPkgs system;
|
||||||
|
in rec {
|
||||||
|
packages = rec {
|
||||||
|
ton-normal = ton { inherit host; };
|
||||||
|
ton-static = ton {
|
||||||
|
inherit host;
|
||||||
|
stdenv = host.makeStatic host.stdenv;
|
||||||
|
staticExternalDeps = true;
|
||||||
|
};
|
||||||
|
ton-staticbin-dylib = host.symlinkJoin {
|
||||||
|
name = "ton";
|
||||||
|
paths = [ ton-static.bin ton-normal.out ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
devShells.default =
|
||||||
|
host.mkShell { inputsFrom = [ packages.ton-normal ]; };
|
||||||
|
})));
|
||||||
|
}
|
|
@ -23,3 +23,5 @@ target_link_libraries(tonhttp PUBLIC tdactor ton_crypto tl_api tdnet )
|
||||||
add_executable(http-proxy http-proxy.cpp)
|
add_executable(http-proxy http-proxy.cpp)
|
||||||
target_include_directories(http-proxy PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>)
|
target_include_directories(http-proxy PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>)
|
||||||
target_link_libraries(http-proxy PRIVATE tonhttp git)
|
target_link_libraries(http-proxy PRIVATE tonhttp git)
|
||||||
|
|
||||||
|
install(TARGETS http-proxy RUNTIME DESTINATION bin)
|
||||||
|
|
|
@ -3,3 +3,5 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
add_executable(rldp-http-proxy rldp-http-proxy.cpp DNSResolver.h DNSResolver.cpp)
|
add_executable(rldp-http-proxy rldp-http-proxy.cpp DNSResolver.h DNSResolver.cpp)
|
||||||
target_include_directories(rldp-http-proxy PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>)
|
target_include_directories(rldp-http-proxy PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>)
|
||||||
target_link_libraries(rldp-http-proxy PRIVATE tonhttp rldp rldp2 dht tonlib git)
|
target_link_libraries(rldp-http-proxy PRIVATE tonhttp rldp rldp2 dht tonlib git)
|
||||||
|
|
||||||
|
install(TARGETS rldp-http-proxy RUNTIME DESTINATION bin)
|
||||||
|
|
10
shell.nix
Normal file
10
shell.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
(import
|
||||||
|
(
|
||||||
|
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
|
||||||
|
fetchTarball {
|
||||||
|
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||||
|
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
{ src = ./.; }
|
||||||
|
).shellNix
|
|
@ -36,7 +36,7 @@ set(STORAGE_CLI_SOURCE
|
||||||
storage-cli.cpp
|
storage-cli.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(storage ${STORAGE_SOURCE})
|
add_library(storage STATIC ${STORAGE_SOURCE})
|
||||||
target_link_libraries(storage tdutils tdactor tddb ton_crypto tl_api ${JEMALLOC_LIBRARIES})
|
target_link_libraries(storage tdutils tdactor tddb ton_crypto tl_api ${JEMALLOC_LIBRARIES})
|
||||||
target_include_directories(storage PUBLIC
|
target_include_directories(storage PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
|
@ -54,4 +54,4 @@ set(STORAGE_TEST_SOURCE
|
||||||
add_subdirectory(storage-daemon)
|
add_subdirectory(storage-daemon)
|
||||||
|
|
||||||
# Do not install it yet
|
# Do not install it yet
|
||||||
#install(TARGETS storage-cli RUNTIME DESTINATION bin)
|
install(TARGETS storage-cli storage-daemon storage-daemon-cli RUNTIME DESTINATION bin)
|
||||||
|
|
|
@ -14,8 +14,9 @@ if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||||
set(CMAKE_INSTALL_LIBDIR "lib")
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
if (NOT ZLIB_FOUND)
|
if (NOT ZLIB_FOUND)
|
||||||
find_package(ZLIB)
|
pkg_check_modules(ZLIB zlib)
|
||||||
endif()
|
endif()
|
||||||
if (ZLIB_FOUND)
|
if (ZLIB_FOUND)
|
||||||
set(TD_HAVE_ZLIB 1)
|
set(TD_HAVE_ZLIB 1)
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
|
option(BUILD_SHARED_LIBS "Use \"OFF\" for a static build." ON)
|
||||||
|
|
||||||
if (NOT OPENSSL_FOUND)
|
if (NOT OPENSSL_FOUND)
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
@ -92,7 +94,7 @@ set(TONLIB_JSON_HEADERS tonlib/tonlib_client_json.h)
|
||||||
set(TONLIB_JSON_SOURCE tonlib/tonlib_client_json.cpp)
|
set(TONLIB_JSON_SOURCE tonlib/tonlib_client_json.cpp)
|
||||||
|
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
if (NOT USE_EMSCRIPTEN)
|
if (NOT USE_EMSCRIPTEN AND BUILD_SHARED_LIBS)
|
||||||
add_library(tonlibjson SHARED ${TONLIB_JSON_SOURCE} ${TONLIB_JSON_HEADERS})
|
add_library(tonlibjson SHARED ${TONLIB_JSON_SOURCE} ${TONLIB_JSON_HEADERS})
|
||||||
else()
|
else()
|
||||||
add_library(tonlibjson STATIC ${TONLIB_JSON_SOURCE} ${TONLIB_JSON_HEADERS})
|
add_library(tonlibjson STATIC ${TONLIB_JSON_SOURCE} ${TONLIB_JSON_HEADERS})
|
||||||
|
@ -100,6 +102,9 @@ endif()
|
||||||
|
|
||||||
target_link_libraries(tonlibjson PRIVATE tonlibjson_private)
|
target_link_libraries(tonlibjson PRIVATE tonlibjson_private)
|
||||||
generate_export_header(tonlibjson EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/tonlib/tonlibjson_export.h)
|
generate_export_header(tonlibjson EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/tonlib/tonlibjson_export.h)
|
||||||
|
if (!BUILD_SHARED_LIBS)
|
||||||
|
target_compile_definitions(tonlibjson PUBLIC TONLIBJSON_STATIC_DEFINE)
|
||||||
|
endif()
|
||||||
target_include_directories(tonlibjson PUBLIC
|
target_include_directories(tonlibjson PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||||
|
@ -107,13 +112,6 @@ if (APPLE)
|
||||||
set_target_properties(tonlibjson PROPERTIES LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/tonlibclientjson_export_list")
|
set_target_properties(tonlibjson PROPERTIES LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/tonlibclientjson_export_list")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(tonlibjson_static STATIC ${TONLIB_JSON_SOURCE} ${TONLIB_JSON_HEADERS})
|
|
||||||
target_link_libraries(tonlibjson_static PRIVATE tonlibjson_private)
|
|
||||||
target_compile_definitions(tonlibjson_static PUBLIC TONLIBJSON_STATIC_DEFINE)
|
|
||||||
target_include_directories(tonlibjson_static PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
|
||||||
|
|
||||||
add_library(TonlibJson INTERFACE)
|
add_library(TonlibJson INTERFACE)
|
||||||
target_link_libraries(TonlibJson INTERFACE tonlibjson)
|
target_link_libraries(TonlibJson INTERFACE tonlibjson)
|
||||||
|
|
||||||
|
@ -158,13 +156,17 @@ endif()
|
||||||
|
|
||||||
install(FILES ${TONLIB_JSON_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/tonlib/tonlibjson_export.h DESTINATION include/tonlib/)
|
install(FILES ${TONLIB_JSON_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/tonlib/tonlibjson_export.h DESTINATION include/tonlib/)
|
||||||
|
|
||||||
if (NOT USE_EMSCRIPTEN)
|
if (NOT USE_EMSCRIPTEN AND BUILD_SHARED_LIBS)
|
||||||
install(EXPORT Tonlib
|
install(EXPORT Tonlib
|
||||||
FILE TonlibTargets.cmake
|
FILE TonlibTargets.cmake
|
||||||
NAMESPACE Tonlib::
|
NAMESPACE Tonlib::
|
||||||
DESTINATION lib/cmake/Tonlib
|
DESTINATION lib/cmake/Tonlib
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add SOVERSION to shared libraries
|
||||||
|
set_property(TARGET tonlibjson PROPERTY SOVERSION ${TON_VERSION})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
write_basic_package_version_file("TonlibConfigVersion.cmake"
|
write_basic_package_version_file("TonlibConfigVersion.cmake"
|
||||||
VERSION ${TON_VERSION}
|
VERSION ${TON_VERSION}
|
||||||
|
@ -174,6 +176,4 @@ install(FILES "TonlibConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/TonlibConfigVers
|
||||||
DESTINATION lib/cmake/Tonlib
|
DESTINATION lib/cmake/Tonlib
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add SOVERSION to shared libraries
|
|
||||||
set_property(TARGET tonlibjson PROPERTY SOVERSION ${TON_VERSION})
|
|
||||||
install(TARGETS tonlib-cli RUNTIME DESTINATION bin)
|
install(TARGETS tonlib-cli RUNTIME DESTINATION bin)
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
|
|
||||||
#include "rldp/rldp.h"
|
#include "rldp/rldp.h"
|
||||||
|
|
||||||
|
#include <list>
|
||||||
|
|
||||||
namespace ton {
|
namespace ton {
|
||||||
|
|
||||||
namespace validator {
|
namespace validator {
|
||||||
|
|
Loading…
Reference in a new issue