Skip to content

Commit

Permalink
adding natively portable binaries (all statically linked with libc++,…
Browse files Browse the repository at this point in the history
… without nixpkgs help) for x86-64 linux
  • Loading branch information
neodix42 committed Dec 18, 2024
1 parent c5a1234 commit 3a0f0b5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-ton-linux-x86-64-portable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Ubuntu TON build (portable, x86-64)

on: [push,workflow_dispatch,workflow_call]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}

steps:
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Install system libraries
run: |
sudo apt-get update
sudo apt-get install -y build-essential git cmake ninja-build libc++-dev libc++abi-dev
- name: Build TON
run: |
git submodule sync --recursive
git submodule update
cp assembly/native/build-ubuntu-portable.sh .
chmod +x build-ubuntu-portable.sh
./build-ubuntu-portable.sh -t -a
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: ton-binaries-${{ matrix.os }}
path: artifacts
8 changes: 5 additions & 3 deletions assembly/native/build-ubuntu-portable.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 automake libtool texinfo autoconf
#sudo apt-get install -y build-essential git cmake ninja-build automake libtool texinfo autoconf libc++-dev libc++abi-dev

with_tests=false
with_artifacts=false
Expand All @@ -24,8 +24,8 @@ else
rm -rf .ninja* CMakeCache.txt
fi

export CC=$(which clang-16)
export CXX=$(which clang++-16)
export CC=$(which clang)
export CXX=$(which clang++)
export CCACHE_DISABLE=1

if [ ! -d "lz4" ]; then
Expand Down Expand Up @@ -101,6 +101,8 @@ else
fi

cmake -GNinja .. \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++" \
-DPORTABLE=1 \
-DCMAKE_BUILD_TYPE=Release \
-DOPENSSL_FOUND=1 \
Expand Down

0 comments on commit 3a0f0b5

Please sign in to comment.