Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-ton-linux-android-tonlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:

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

- name: Install system libraries
Expand All @@ -36,7 +36,7 @@ jobs:
./build-android-tonlib.sh -a

- name: Upload artifacts
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: ton-android-tonlib
path: artifacts
42 changes: 20 additions & 22 deletions .github/workflows/build-ton-linux-arm64-appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

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

Expand All @@ -21,29 +21,27 @@ jobs:
- name: Install system libraries
run: |
sudo apt update
sudo apt install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev ccache
sudo apt install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev ccache libssl-dev
sudo apt remove libgsl-dev
mkdir ~/.ccache 3pp
mkdir -p ~/.ccache

- name: Install clang-16
# Smart LLVM installation based on Ubuntu version
- name: Install LLVM/Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16 clang

- name: Cache 3pp
id: cache-3pp
uses: actions/cache@v4
with:
path: 3pp
key: ${{ runner.os }}-${{ runner.arch }}-ubuntu-22.04-arm-3pp-${{ hashFiles('**/assembly/native/build-ubuntu-appimages.sh') }}

- name: Cache OpenSSL
id: cache-openssl
uses: actions/cache@v4
with:
path: openssl_3
key: ${{ runner.os }}-${{ runner.arch }}-ubuntu-22.04-arm-openssl_3-${{ hashFiles('**/assembly/native/build-ubuntu-appimages.sh') }}
UBUNTU_VERSION=$(lsb_release -rs)
echo "Detected Ubuntu version: $UBUNTU_VERSION"

if [[ "$UBUNTU_VERSION" == "24.04" ]]; then
# Ubuntu 24.04 has newer clang available in default repos
echo "Installing clang from default repos for Ubuntu 24.04"
sudo apt-get install -y clang-16 || sudo apt-get install -y clang
else
# For older Ubuntu versions, use LLVM script
echo "Installing clang-16 from LLVM repos for Ubuntu $UBUNTU_VERSION"
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16 clang || echo "Warning: LLVM script failed, using system clang"
fi

- name: Restore cache TON
uses: actions/cache/restore@v4
Expand Down Expand Up @@ -92,7 +90,7 @@ jobs:
cp ./artifacts/libemulator.so appimages/artifacts/

- name: Upload artifacts
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: ton-arm64-linux
path: appimages/artifacts
13 changes: 3 additions & 10 deletions .github/workflows/build-ton-linux-arm64-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

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

Expand All @@ -25,7 +25,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 liblz4-dev libjemalloc-dev ccache
sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev libjemalloc-dev ccache libssl-dev
mkdir ~/.ccache

- if: matrix.os != 'ubuntu-24.04-arm'
Expand All @@ -35,13 +35,6 @@ jobs:
chmod +x llvm.sh
sudo ./llvm.sh 16 clang

- name: Cache OpenSSL
id: cache-openssl
uses: actions/cache@v4
with:
path: openssl_3
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.os }}-openssl_3-${{ hashFiles('**/assembly/native/build-ubuntu-shared.sh') }}

- name: Cache TON test
id: cache-ton
uses: actions/cache@v4
Expand All @@ -62,4 +55,4 @@ jobs:
- name: Run Tests
run: |
cd build
ctest --output-on-failure --timeout 1800
ctest --output-on-failure --timeout 1800 --parallel $(nproc)
42 changes: 20 additions & 22 deletions .github/workflows/build-ton-linux-x86-64-appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

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

Expand All @@ -21,28 +21,26 @@ jobs:
- name: Install system libraries
run: |
sudo apt update
sudo apt install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev ccache libgsl-dev libblas-dev
mkdir ~/.ccache 3pp
sudo apt install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev ccache libgsl-dev libblas-dev libssl-dev
mkdir -p ~/.ccache

- name: Install clang-16
# Smart LLVM installation based on Ubuntu version
- name: Install LLVM/Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16 clang

- name: Cache 3pp
id: cache-3pp
uses: actions/cache@v4
with:
path: 3pp
key: ${{ runner.os }}-${{ runner.arch }}-ubuntu-22.04-3pp-${{ hashFiles('**/assembly/native/build-ubuntu-appimages.sh') }}

- name: Cache OpenSSL
id: cache-openssl
uses: actions/cache@v4
with:
path: openssl_3
key: ${{ runner.os }}-${{ runner.arch }}-ubuntu-22.04-openssl_3-${{ hashFiles('**/assembly/native/build-ubuntu-appimages.sh') }}
UBUNTU_VERSION=$(lsb_release -rs)
echo "Detected Ubuntu version: $UBUNTU_VERSION"

if [[ "$UBUNTU_VERSION" == "24.04" ]]; then
# Ubuntu 24.04 has newer clang available in default repos
echo "Installing clang from default repos for Ubuntu 24.04"
sudo apt-get install -y clang-16 || sudo apt-get install -y clang
else
# For older Ubuntu versions, use LLVM script
echo "Installing clang-16 from LLVM repos for Ubuntu $UBUNTU_VERSION"
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16 clang || echo "Warning: LLVM script failed, using system clang"
fi

- name: Restore cache TON
uses: actions/cache/restore@v4
Expand Down Expand Up @@ -90,7 +88,7 @@ jobs:
cp ./artifacts/libemulator.so appimages/artifacts/

- name: Upload artifacts
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: ton-x86_64-linux
path: appimages/artifacts
52 changes: 34 additions & 18 deletions .github/workflows/build-ton-linux-x86-64-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

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

Expand All @@ -25,28 +25,36 @@ 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 liblz4-dev libjemalloc-dev ccache
mkdir ~/.ccache
sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev libjemalloc-dev ccache libssl-dev
mkdir -p ~/.ccache

- if: matrix.os != 'ubuntu-24.04'
# Smart LLVM installation based on Ubuntu version
- name: Install LLVM/Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16 clang
UBUNTU_VERSION=$(lsb_release -rs)
echo "Detected Ubuntu version: $UBUNTU_VERSION"

if [[ "$UBUNTU_VERSION" == "24.04" ]]; then
# Ubuntu 24.04 has newer clang available in default repos
echo "Installing clang from default repos for Ubuntu 24.04"
sudo apt-get install -y clang-16 || sudo apt-get install -y clang
else
# For older Ubuntu versions, use LLVM script
echo "Installing clang-16 from LLVM repos for Ubuntu $UBUNTU_VERSION"
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16 clang || echo "Warning: LLVM script failed, using system clang"
fi

- name: Cache OpenSSL
id: cache-openssl
uses: actions/cache@v4
with:
path: openssl_3
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.os }}-openssl_3-${{ hashFiles('**/assembly/native/build-ubuntu-shared.sh') }}

- name: Restore cache TON
uses: actions/cache@v4
# Improved ccache setup with better restore keys
- name: Restore ccache
uses: actions/cache/restore@v4
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.os }}-shared-ccache-${{ steps.date-stamp.outputs.timestamp }}
restore-keys: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.os }}-shared-ccache
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-${{ matrix.os }}-shared-ccache-
${{ runner.os }}-${{ runner.arch }}-shared-ccache-

- name: Build TON
run: |
Expand All @@ -57,7 +65,15 @@ jobs:
./build-ubuntu-shared.sh -t -c
ccache -sp

- name: Save ccache
uses: actions/cache/save@v4
if: always() # Save cache even if build fails
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.os }}-shared-ccache-${{ steps.date-stamp.outputs.timestamp }}

# Run tests in parallel with reduced timeout for faster feedback
- name: Run Tests
run: |
cd build
ctest --output-on-failure --timeout 1800
ctest --output-on-failure --timeout 1800 --parallel $(nproc)
52 changes: 35 additions & 17 deletions .github/workflows/build-ton-macos-13-x86-64-portable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

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

Expand All @@ -18,25 +18,35 @@ jobs:
run: |
echo "timestamp=$(date -u "+%Y%m%d%H%M_%S")" >> "$GITHUB_OUTPUT"

- name: Create directories
- name: Setup build environment
run: |
# Install dependencies using brew bundle
cat <<EOF | brew bundle install --no-upgrade --file=-
brew "autoconf"
brew "automake"
brew "libtool"
brew "ccache"
brew "lz4"
brew "libsodium"
brew "openssl@3"
brew "zlib"
brew "libmicrohttpd"
brew "ninja"
brew "pkg-config"
brew "texinfo"
brew "llvm@16"
EOF
mkdir -p ~/.ccache
mkdir -p 3pp

- name: Cache 3pp
id: cache-3pp
uses: actions/cache@v4
with:
path: 3pp
key: ${{ runner.os }}-${{ runner.arch }}-13-3pp-${{ hashFiles('**/assembly/native/build-macos-portable.sh') }}

- name: Cache TON test
id: cache-ton
uses: actions/cache@v4
# Improved cache with better restore keys
- name: Restore ccache
uses: actions/cache/restore@v4
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ runner.arch }}-13-portable-ccache-${{ steps.date-stamp.outputs.timestamp }}
restore-keys: ${{ runner.os }}-${{ runner.arch }}-13-portable-ccache
key: ${{ runner.os }}-${{ runner.arch }}-macos-13-portable-ccache-${{ steps.date-stamp.outputs.timestamp }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-macos-13-portable-ccache-
${{ runner.os }}-${{ runner.arch }}-portable-ccache-

- name: Build TON
run: |
Expand All @@ -47,13 +57,21 @@ jobs:
./build-macos-portable.sh -t -a -c -o 13.0
ccache -sp

- name: Save ccache
uses: actions/cache/save@v4
if: always() # Save cache even if build fails
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ runner.arch }}-macos-13-portable-ccache-${{ steps.date-stamp.outputs.timestamp }}

# Run tests in parallel with reduced timeout for faster feedback
- name: Run Tests
run: |
cd build
ctest --output-on-failure --timeout 1800
ctest --output-on-failure --timeout 1800 --parallel $(sysctl -n hw.ncpu)

- name: Upload artifacts
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: ton-x86_64-macos
path: artifacts
Loading