Update CI workflow to use Ubuntu 22.04 and downgrade Clang to version… #14
Workflow file for this run
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: Build and publish Linux TDLib binaries | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "aiotdlib_*" | |
| jobs: | |
| build_ubuntu_x86_64: | |
| name: Build Linux x86_64 | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: tdlib | |
| - name: Build TDLib x86_64 | |
| env: | |
| CXXFLAGS: "-stdlib=libc++" | |
| CC: "/usr/bin/clang-14" | |
| CXX: "/usr/bin/clang++-14" | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y --no-install-recommends make zlib1g-dev libssl-dev gperf php-cli cmake clang-14 libc++-14-dev libc++abi-14-dev | |
| mkdir build | |
| cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=../tdlib_install_x86_64 -DTD_ENABLE_LTO=ON -DCMAKE_AR=/usr/bin/llvm-ar-14 -DCMAKE_NM=/usr/bin/llvm-nm-14 -DCMAKE_OBJDUMP=/usr/bin/llvm-objdump-14 -DCMAKE_RANLIB=/usr/bin/llvm-ranlib-14 -S ./tdlib -B ./build | |
| cmake --build ./build --target tdjson --parallel $(nproc) | |
| strip --strip-all ./build/libtdjson.so.* | |
| mv -v ./build/libtdjson.so.* ./build/libtdjson_linux_amd64.so | |
| - name: Upload x86_64 artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tdjson-x86_64 | |
| path: build/libtdjson_linux_amd64.so | |
| build_ubuntu_arm64: | |
| name: Build Linux arm64 | |
| runs-on: ubuntu-22.04-arm | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: tdlib | |
| - name: Build TDLib arm64 | |
| env: | |
| CXXFLAGS: "-stdlib=libc++" | |
| CC: "/usr/bin/clang-14" | |
| CXX: "/usr/bin/clang++-14" | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y --no-install-recommends make zlib1g-dev libssl-dev gperf php-cli cmake clang-14 libc++-14-dev libc++abi-14-dev | |
| mkdir build | |
| cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=../tdlib_install_arm64 -DTD_ENABLE_LTO=ON -DCMAKE_AR=/usr/bin/llvm-ar-14 -DCMAKE_NM=/usr/bin/llvm-nm-14 -DCMAKE_OBJDUMP=/usr/bin/llvm-objdump-14 -DCMAKE_RANLIB=/usr/bin/llvm-ranlib-14 -S ./tdlib -B ./build | |
| cmake --build ./build --target tdjson --parallel $(nproc) | |
| strip --strip-all ./build/libtdjson.so.* | |
| mv -v ./build/libtdjson.so.* ./build/libtdjson_linux_arm64.so | |
| - name: Upload arm64 artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tdjson-arm64 | |
| path: build/libtdjson_linux_arm64.so | |
| release: | |
| name: Release artifacts | |
| needs: [build_ubuntu_x86_64, build_ubuntu_arm64] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Release artifacts to packages | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| artifacts/tdjson-x86_64/libtdjson_linux_amd64.so | |
| artifacts/tdjson-arm64/libtdjson_linux_arm64.so |