diff --git a/.github/compiler.sh b/.github/compiler.sh new file mode 100644 index 000000000..7a65710f8 --- /dev/null +++ b/.github/compiler.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +cd ~ +sudo apt-get update -y +sudo apt-get upgrade -y +sudo apt-get install -y make git zlib1g-dev libssl-dev gperf cmake clang-10 libc++-dev libc++abi-dev +git clone --recursive https://github.com/tdlib/telegram-bot-api.git +rm -rf telegram-bot-api/build +mkdir -p telegram-bot-api/build +cd telegram-bot-api/build +CXXFLAGS="-stdlib=libc++" CC=/usr/bin/clang-10 CXX=/usr/bin/clang++-10 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. .. +cmake --build . --target install \ No newline at end of file diff --git a/.github/workflows/api-compiler.yml b/.github/workflows/api-compiler.yml index 62e2906c3..f534b8f47 100644 --- a/.github/workflows/api-compiler.yml +++ b/.github/workflows/api-compiler.yml @@ -11,23 +11,15 @@ jobs: - name: Prepare for Compilation run: | - sudo apt-get update - sudo apt-get upgrade - sudo apt-get install make git zlib1g-dev libssl-dev gperf cmake g++ git config --global user.name "XelXen" git config --global user.email "78258352+XelXen@users.noreply.github.com" git config --global credential.helper store echo "https://XelXen:${{ secrets.GH_TOKEN }}@github.com" > ~/.git-credentials - git clone --recursive https://github.com/tdlib/telegram-bot-api.git - cd telegram-bot-api - rm -rf build - mkdir build - cd build - - name: Patch and Compile + - name: Run Script run: | - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. .. - cmake --build . --target install + chmod 755 .github/compiler.sh + .github/compiler.sh - name: Binary Archive run: |