Skip to content

Commit

Permalink
Merge pull request #959 from ton-blockchain/testnet
Browse files Browse the repository at this point in the history
Merge developer branch
  • Loading branch information
EmelyanenkoK authored Apr 10, 2024
2 parents dd5540d + a2bd695 commit 8acf37c
Show file tree
Hide file tree
Showing 137 changed files with 14,590 additions and 1,393 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-ton-linux-android-tonlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
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
libtool autoconf libsodium-dev libsecp256k1-dev liblz4-dev
- name: Build TON
run: |
Expand All @@ -29,4 +29,4 @@ jobs:
uses: actions/upload-artifact@master
with:
name: tonlib-android
path: artifacts
path: artifacts
2 changes: 1 addition & 1 deletion .github/workflows/build-ton-linux-x86-64-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- 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
sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev
- name: Install clang-16
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-ton-wasm-emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- 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
sudo apt-get install -y build-essential git openssl cmake ninja-build zlib1g-dev libssl-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev
- name: Build TON WASM artifacts
run: |
Expand All @@ -27,4 +27,4 @@ jobs:
uses: actions/upload-artifact@master
with:
name: ton-wasm-binaries
path: artifacts
path: artifacts
24 changes: 24 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ jobs:
asset_name: tonlibjson.dll
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Windows 2019 single artifact - libemulator
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-win-binaries/emulator.dll
asset_name: libemulator.dll
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Windows 2019 single artifact - tonlib-cli
uses: svenstaro/upload-release-action@v2
with:
Expand Down Expand Up @@ -273,6 +281,14 @@ jobs:
asset_name: tonlibjson-mac-x86-64.dylib
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac x86-64 single artifact - libemulator
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-x86_64-macos-binaries/libemulator.dylib
asset_name: libemulator-mac-x86-64.dylib
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Mac x86-64 single artifact - tonlib-cli
uses: svenstaro/upload-release-action@v2
with:
Expand Down Expand Up @@ -355,6 +371,14 @@ jobs:
asset_name: tonlibjson-linux-x86_64.so
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Linux x86-64 single artifact - libemulator
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/ton-x86_64-linux-binaries/libemulator.so
asset_name: libemulator-linux-x86_64.so
tag: ${{ steps.tag.outputs.TAG }}

- name: Upload Linux x86-64 single artifact - tonlib-cli
uses: svenstaro/upload-release-action@v2
with:
Expand Down
26 changes: 13 additions & 13 deletions assembly/cicd/jenkins/test-builds.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pipeline {
label 'Ubuntu_x86-64'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cp assembly/native/build-ubuntu-shared.sh .
chmod +x build-ubuntu-shared.sh
Expand All @@ -27,7 +27,7 @@ pipeline {
label 'Ubuntu_x86-64'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cp assembly/nix/build-linux-x86-64-nix.sh .
chmod +x build-linux-x86-64-nix.sh
Expand All @@ -46,7 +46,7 @@ pipeline {
label 'Ubuntu_arm64'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cp assembly/native/build-ubuntu-shared.sh .
chmod +x build-ubuntu-shared.sh
Expand All @@ -65,7 +65,7 @@ pipeline {
label 'Ubuntu_arm64'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cp assembly/nix/build-linux-arm64-nix.sh .
chmod +x build-linux-arm64-nix.sh
Expand All @@ -84,7 +84,7 @@ pipeline {
label 'macOS_12.7_x86-64'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cp assembly/native/build-macos-shared.sh .
chmod +x build-macos-shared.sh
Expand All @@ -103,7 +103,7 @@ pipeline {
label 'macOS_12.7_x86-64'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cp assembly/nix/build-macos-nix.sh .
chmod +x build-macos-nix.sh
Expand All @@ -122,7 +122,7 @@ pipeline {
label 'macOS_12.6-arm64-m1'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cp assembly/native/build-macos-shared.sh .
chmod +x build-macos-shared.sh
Expand All @@ -141,7 +141,7 @@ pipeline {
label 'macOS_12.6-arm64-m1'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cp assembly/nix/build-macos-nix.sh .
chmod +x build-macos-nix.sh
Expand All @@ -160,7 +160,7 @@ pipeline {
label 'macOS_13.2-arm64-m2'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cp assembly/native/build-macos-shared.sh .
chmod +x build-macos-shared.sh
Expand All @@ -179,10 +179,10 @@ pipeline {
label 'Windows_x86-64'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
bat '''
copy assembly\\native\\build-windows.bat .
build-windows.bat
build-windows.bat -t
'''
bat '''
cd artifacts
Expand All @@ -197,7 +197,7 @@ pipeline {
label 'Ubuntu_x86-64'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cp assembly/android/build-android-tonlib.sh .
chmod +x build-android-tonlib.sh
Expand All @@ -216,7 +216,7 @@ pipeline {
label 'Ubuntu_x86-64'
}
steps {
timeout(time: 90, unit: 'MINUTES') {
timeout(time: 180, unit: 'MINUTES') {
sh '''
cd assembly/wasm
chmod +x fift-func-wasm-build-ubuntu.sh
Expand Down
20 changes: 19 additions & 1 deletion assembly/native/build-macos-portable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ else
fi
export CCACHE_DISABLE=1

if [ ! -d "lz4" ]; then
git clone https://github.com/lz4/lz4.git
cd lz4
lz4Path=`pwd`
git checkout v1.9.4
make -j12
test $? -eq 0 || { echo "Can't compile lz4"; exit 1; }
cd ..
# ./lib/liblz4.a
# ./lib
else
lz4Path=$(pwd)/lz4
echo "Using compiled lz4"
fi

if [ ! -d "secp256k1" ]; then
git clone https://github.com/bitcoin-core/secp256k1.git
cd secp256k1
Expand Down Expand Up @@ -128,7 +143,10 @@ cmake -GNinja .. \
-DSODIUM_LIBRARY_RELEASE=$sodiumPath/src/libsodium/.libs/libsodium.a \
-DMHD_FOUND=1 \
-DMHD_INCLUDE_DIR=$libmicrohttpdPath/src/include \
-DMHD_LIBRARY=$libmicrohttpdPath/src/microhttpd/.libs/libmicrohttpd.a
-DMHD_LIBRARY=$libmicrohttpdPath/src/microhttpd/.libs/libmicrohttpd.a \
-DLZ4_FOUND=1 \
-DLZ4_INCLUDE_DIRS=$lz4Path/lib \
-DLZ4_LIBRARIES=$lz4Path/lib/liblz4.a


test $? -eq 0 || { echo "Can't configure ton"; exit 1; }
Expand Down
18 changes: 17 additions & 1 deletion assembly/native/build-macos-shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ else
echo "Using compiled secp256k1"
fi

if [ ! -d "lz4" ]; then
git clone https://github.com/lz4/lz4
cd lz4
lz4Path=`pwd`
git checkout v1.9.4
make -j12
test $? -eq 0 || { echo "Can't compile lz4"; exit 1; }
cd ..
else
lz4Path=$(pwd)/lz4
echo "Using compiled lz4"
fi

brew unlink openssl@1.1
brew install openssl@3
brew unlink openssl@3 && brew link --overwrite openssl@3
Expand All @@ -59,7 +72,10 @@ cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DSECP256K1_FOUND=1 \
-DSECP256K1_INCLUDE_DIR=$secp256k1Path/include \
-DSECP256K1_LIBRARY=$secp256k1Path/.libs/libsecp256k1.a
-DSECP256K1_LIBRARY=$secp256k1Path/.libs/libsecp256k1.a \
-DLZ4_FOUND=1 \
-DLZ4_LIBRARIES=$lz4Path/lib/liblz4.a \
-DLZ4_INCLUDE_DIRS=$lz4Path/lib

test $? -eq 0 || { echo "Can't configure ton"; exit 1; }

Expand Down
20 changes: 19 additions & 1 deletion assembly/native/build-ubuntu-portable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ export CC=$(which clang-16)
export CXX=$(which clang++-16)
export CCACHE_DISABLE=1

if [ ! -d "lz4" ]; then
git clone https://github.com/lz4/lz4.git
cd lz4
lz4Path=`pwd`
git checkout v1.9.4
make -j12
test $? -eq 0 || { echo "Can't compile lz4"; exit 1; }
cd ..
# ./lib/liblz4.a
# ./lib
else
lz4Path=$(pwd)/lz4
echo "Using compiled lz4"
fi

if [ ! -d "secp256k1" ]; then
git clone https://github.com/bitcoin-core/secp256k1.git
Expand Down Expand Up @@ -120,7 +134,11 @@ cmake -GNinja .. \
-DSODIUM_LIBRARY_RELEASE=$sodiumPath/src/libsodium/.libs/libsodium.a \
-DMHD_FOUND=1 \
-DMHD_INCLUDE_DIR=$libmicrohttpdPath/src/include \
-DMHD_LIBRARY=$libmicrohttpdPath/src/microhttpd/.libs/libmicrohttpd.a
-DMHD_LIBRARY=$libmicrohttpdPath/src/microhttpd/.libs/libmicrohttpd.a \
-DLZ4_FOUND=1 \
-DLZ4_INCLUDE_DIRS=$lz4Path/lib \
-DLZ4_LIBRARIES=$lz4Path/lib/liblz4.a



test $? -eq 0 || { echo "Can't configure ton"; exit 1; }
Expand Down
4 changes: 2 additions & 2 deletions assembly/native/build-ubuntu-shared.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#/bin/bash

#sudo apt-get update
#sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev
#sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev

with_tests=false
with_artifacts=false
Expand Down Expand Up @@ -119,4 +119,4 @@ if [ "$with_tests" = true ]; then
cd build
# ctest --output-on-failure -E "test-catchain|test-actors|test-smartcont|test-adnl|test-validator-session-state|test-dht|test-rldp"
ctest --output-on-failure --timeout 1800
fi
fi
Loading

0 comments on commit 8acf37c

Please sign in to comment.