Skip to content

Merge pull request #1640 from ton-blockchain/testnet #20

Merge pull request #1640 from ton-blockchain/testnet

Merge pull request #1640 from ton-blockchain/testnet #20

name: Ubuntu TON build (shared, x86-64)
on: [push,workflow_dispatch,workflow_call]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Date Stamp
shell: bash
id: date-stamp
run: |
echo "timestamp=$(date -u "+%Y%m%d%H%M_%S")" >> "$GITHUB_OUTPUT"
- 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
- if: matrix.os != 'ubuntu-24.04'
run: |
wget https://apt.llvm.org/llvm.sh
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: Restore cache TON
uses: actions/cache@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
- name: Build TON
run: |
git submodule sync --recursive
git submodule update
cp assembly/native/build-ubuntu-shared.sh .
chmod +x build-ubuntu-shared.sh
./build-ubuntu-shared.sh -t -c
ccache -sp
- name: Run Tests
run: |
cd build
ctest --output-on-failure --timeout 1800