Skip to content

Commit e060515

Browse files
authored
Reworked TON portable artifacts (#1486)
* improve windows builds * install nasm for openssl compilation on win * install nasm for openssl compilation on win for github * add create-state, proxy-liteserver, rldp-http-proxy, http-proxy, adnl-proxy, dht-server, libtonlibjson.so and libemulator.so to docker image * build new artifacts inside Docker * add files smartcont/auto/* to docker image * build arm64 in docker branch build * improve secp256k1 build * adding natively portable binaries (all statically linked with libc++, without nixpkgs help) for x86-64 linux * install missing headers on ubuntu 20.04 * use clang-16 on ubuntu 20.04 * remove gsl for portable artifacts; add -f key to generate-random-id in order to read addr_list from file; * typo * decode json * decode json * add github workflow for appimages creation * add missing dependencies * use libc++ for appimages artifacts * typo * appimages wihtout libc++ * appimages with libc++ and some checks * add appimages to release (for testing) * add appimages to release (for testing) * add appimages to release (for testing) * add appimages to release (for testing) 2 * add appimages to release (for testing) 3 * appimages only on ubuntu 22 with ssl-3 for now * appimages only on ubuntu 20 with ssl-3 for now * appimages only on ubuntu 20 with ssl-3 for now * add export LD_LIBRARY_PATH="${APPDIR}/usr/lib:${LD_LIBRARY_PATH}" to appimage AppRun * create release * appimages without jemalloc * bind specific libraries to appimages * add libreadline * add plain portable libs * add proper /lib/x86_64-linux-gnu/libreadline.so.8 * app images build with libc * try to ensure ABI compatibility with older glibc * try to ensure ABI compatibility with older glibc for shared libraries * shared lib without libc but with D_GLIBCXX_USE_CXX11_ABI and -static-libgcc -static-libstdc++ * add -fPIC -fcommon * add /lib/x86_64-linux-gnu/libstdc++.so.6 to static binaries * add -static-libgcc -static-libstdc++ to libtonlibjson and emulator when PORTABLE=1 * add -static-libgcc -static-libstdc++ to libtonlibjson and emulator when PORTABLE=1 * update emulator portable * Update CMakeLists.txt * test portable macos binaries * do not use -static-libgcc -static-libstdc++ on mac for shared libs * do not use -static-libgcc -static-libstdc++ on mac for shared libs * adjust create-release.yml * minor fixes, typos * minor fixes * linux apps double check * avoid infinite loop when place in system bin dir * avoid infinite loop when place in system bin dir 2 * test compilation on linux arm64 * test appimages on arm64 linux * test appimages on arm64 linux 2 * add portable linux arm64 to release * clean up * update README.md
1 parent a224491 commit e060515

25 files changed

+718
-522
lines changed

.github/script/amd64-20.04.Dockerfile

-20
This file was deleted.

.github/script/amd64-22.04.Dockerfile

-20
This file was deleted.

.github/script/arm64-20.04.Dockerfile

-20
This file was deleted.

.github/script/arm64-22.04.Dockerfile

-20
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Ubuntu TON build (AppImages, arm64)
2+
3+
on: [push,workflow_dispatch,workflow_call]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-22.04-arm
8+
9+
steps:
10+
- name: Check out repository
11+
uses: actions/checkout@v3
12+
with:
13+
submodules: 'recursive'
14+
15+
- name: Install system libraries
16+
run: |
17+
sudo apt update
18+
sudo apt install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev
19+
sudo apt remove libgsl-dev
20+
21+
- name: Install clang-16
22+
run: |
23+
wget https://apt.llvm.org/llvm.sh
24+
chmod +x llvm.sh
25+
sudo ./llvm.sh 16 all
26+
27+
- name: Build TON
28+
run: |
29+
git submodule sync --recursive
30+
git submodule update
31+
cp assembly/native/build-ubuntu-appimages.sh .
32+
chmod +x build-ubuntu-appimages.sh
33+
./build-ubuntu-appimages.sh -a
34+
35+
- name: Make AppImages
36+
run: |
37+
cp assembly/appimage/create-appimages.sh .
38+
cp assembly/appimage/AppRun .
39+
cp assembly/appimage/ton.png .
40+
chmod +x create-appimages.sh
41+
./create-appimages.sh aarch64
42+
rm -rf artifacts
43+
44+
45+
- name: Build TON libs
46+
run: |
47+
cp assembly/native/build-ubuntu-portable-libs.sh .
48+
chmod +x build-ubuntu-portable-libs.sh
49+
./build-ubuntu-portable-libs.sh -a
50+
cp ./artifacts/libtonlibjson.so appimages/artifacts/
51+
cp ./artifacts/libemulator.so appimages/artifacts/
52+
53+
- name: Upload artifacts
54+
uses: actions/upload-artifact@master
55+
with:
56+
name: ton-arm64-linux
57+
path: appimages/artifacts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Ubuntu TON build (shared, arm64)
2+
3+
on: [push,workflow_dispatch,workflow_call]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [ubuntu-22.04-arm, ubuntu-24.04-arm]
11+
runs-on: ${{ matrix.os }}
12+
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v3
16+
with:
17+
submodules: 'recursive'
18+
19+
- name: Install system libraries
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev libjemalloc-dev
23+
24+
- if: matrix.os != 'ubuntu-24.04-arm'
25+
name: Install llvm-16
26+
run: |
27+
wget https://apt.llvm.org/llvm.sh
28+
chmod +x llvm.sh
29+
sudo ./llvm.sh 16 all
30+
31+
- name: Build TON
32+
run: |
33+
git submodule sync --recursive
34+
git submodule update
35+
cp assembly/native/build-ubuntu-shared.sh .
36+
chmod +x build-ubuntu-shared.sh
37+
./build-ubuntu-shared.sh -t -a
38+
39+
- name: Upload artifacts
40+
uses: actions/upload-artifact@master
41+
with:
42+
name: ton-binaries-${{ matrix.os }}
43+
path: artifacts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Ubuntu TON build (AppImages, x86-64)
2+
3+
on: [push,workflow_dispatch,workflow_call]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-20.04
8+
9+
steps:
10+
- name: Check out repository
11+
uses: actions/checkout@v3
12+
with:
13+
submodules: 'recursive'
14+
15+
- name: Install system libraries
16+
run: |
17+
sudo apt update
18+
sudo apt install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev
19+
sudo apt remove libgsl-dev
20+
21+
- name: Install gcc-11 g++-11
22+
run: |
23+
sudo apt install -y manpages-dev software-properties-common
24+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
25+
sudo apt update && sudo apt install gcc-11 g++-11
26+
27+
- name: Install clang-16
28+
run: |
29+
wget https://apt.llvm.org/llvm.sh
30+
chmod +x llvm.sh
31+
sudo ./llvm.sh 16 all
32+
33+
- name: Build TON
34+
run: |
35+
git submodule sync --recursive
36+
git submodule update
37+
cp assembly/native/build-ubuntu-appimages.sh .
38+
chmod +x build-ubuntu-appimages.sh
39+
./build-ubuntu-appimages.sh -a
40+
41+
- name: Make AppImages
42+
run: |
43+
cp assembly/appimage/create-appimages.sh .
44+
cp assembly/appimage/AppRun .
45+
cp assembly/appimage/ton.png .
46+
chmod +x create-appimages.sh
47+
./create-appimages.sh x86_64
48+
rm -rf artifacts
49+
50+
51+
- name: Build TON libs
52+
run: |
53+
cp assembly/native/build-ubuntu-portable-libs.sh .
54+
chmod +x build-ubuntu-portable-libs.sh
55+
./build-ubuntu-portable-libs.sh -a
56+
cp ./artifacts/libtonlibjson.so appimages/artifacts/
57+
cp ./artifacts/libemulator.so appimages/artifacts/
58+
59+
- name: Upload artifacts
60+
uses: actions/upload-artifact@master
61+
with:
62+
name: ton-x86_64-linux
63+
path: appimages/artifacts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: MacOS-13 TON build (portable, x86-64)
2+
3+
on: [push,workflow_dispatch,workflow_call]
4+
5+
jobs:
6+
build:
7+
runs-on: macos-13
8+
9+
steps:
10+
- name: Check out repository
11+
uses: actions/checkout@v3
12+
with:
13+
submodules: 'recursive'
14+
15+
- name: Build TON
16+
run: |
17+
git submodule sync --recursive
18+
git submodule update
19+
cp assembly/native/build-macos-portable.sh .
20+
chmod +x build-macos-portable.sh
21+
./build-macos-portable.sh -t -a
22+
23+
- name: Upload artifacts
24+
uses: actions/upload-artifact@master
25+
with:
26+
name: ton-x86_64-macos
27+
path: artifacts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: MacOS-14 TON build (portable, arm64)
2+
3+
on: [push,workflow_dispatch,workflow_call]
4+
5+
jobs:
6+
build:
7+
runs-on: macos-14
8+
9+
steps:
10+
- name: Check out repository
11+
uses: actions/checkout@v3
12+
with:
13+
submodules: 'recursive'
14+
15+
- name: Build TON
16+
run: |
17+
git submodule sync --recursive
18+
git submodule update
19+
cp assembly/native/build-macos-portable.sh .
20+
chmod +x build-macos-portable.sh
21+
./build-macos-portable.sh -t -a
22+
23+
- name: Upload artifacts
24+
uses: actions/upload-artifact@master
25+
with:
26+
name: ton-arm64-macos
27+
path: artifacts

.github/workflows/build-ton-wasm-emscripten.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ jobs:
2828
- name: Upload artifacts
2929
uses: actions/upload-artifact@master
3030
with:
31-
name: ton-wasm-binaries
31+
name: ton-wasm
3232
path: artifacts

0 commit comments

Comments
 (0)