Merge pull request #1912 from EmelyanenkoK/codex-rules #597
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ubuntu TON build (AppImages, arm64) | |
| on: [push, pull_request, workflow_dispatch, workflow_call] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04-arm | |
| 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 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 libgslcblas0 | |
| mkdir ~/.ccache 3pp | |
| - name: Install clang-16 | |
| run: | | |
| lsb_release -a | |
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
| echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | sudo tee /etc/apt/sources.list.d/llvm.list | |
| sudo apt-get -y update | |
| sudo apt-get install -y clang-16 | |
| - 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') }} | |
| - name: Restore cache TON | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.ccache | |
| key: ${{ runner.os }}-${{ runner.arch }}-ubuntu-22.04-arm-portable-ccache-${{ steps.date-stamp.outputs.timestamp }} | |
| restore-keys: ${{ runner.os }}-${{ runner.arch }}-ubuntu-22.04-arm-portable-ccache | |
| - name: Build TON | |
| run: | | |
| git submodule sync --recursive | |
| git submodule update | |
| cp assembly/native/build-ubuntu-appimages.sh . | |
| chmod +x build-ubuntu-appimages.sh | |
| ./build-ubuntu-appimages.sh -a -c | |
| ccache -sp | |
| - name: Save cache TON | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ~/.ccache | |
| key: ${{ runner.os }}-${{ runner.arch }}-ubuntu-22.04-arm-portable-ccache-${{ steps.date-stamp.outputs.timestamp }} | |
| - name: Make AppImages | |
| run: | | |
| cp assembly/appimage/create-appimages.sh . | |
| cp assembly/appimage/AppRun . | |
| cp assembly/appimage/ton.png . | |
| chmod +x create-appimages.sh | |
| ./create-appimages.sh aarch64 | |
| rm -rf artifacts | |
| - name: Save/Restore cache TON libs | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.ccache | |
| key: ${{ runner.os }}-${{ runner.arch }}-ubuntu-22.04-arm-portable-libs-ccache-${{ steps.date-stamp.outputs.timestamp }} | |
| restore-keys: ${{ runner.os }}-${{ runner.arch }}-ubuntu-22.04-arm-portable-libs-ccache | |
| - name: Build TON libs | |
| run: | | |
| cp assembly/native/build-ubuntu-portable-libs.sh . | |
| chmod +x build-ubuntu-portable-libs.sh | |
| ./build-ubuntu-portable-libs.sh -a -c | |
| cp ./artifacts/libtonlibjson.so appimages/artifacts/ | |
| cp ./artifacts/libemulator.so appimages/artifacts/ | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@master | |
| with: | |
| name: ton-arm64-linux | |
| path: appimages/artifacts |