Seperate Compiler Script

This commit is contained in:
XelXen 2022-06-17 11:46:07 +05:30 committed by GitHub
parent 0599581a89
commit 72a97574b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 11 deletions

12
.github/compiler.sh vendored Normal file
View File

@ -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

View File

@ -11,23 +11,15 @@ jobs:
- name: Prepare for Compilation - name: Prepare for Compilation
run: | 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.name "XelXen"
git config --global user.email "78258352+XelXen@users.noreply.github.com" git config --global user.email "78258352+XelXen@users.noreply.github.com"
git config --global credential.helper store git config --global credential.helper store
echo "https://XelXen:${{ secrets.GH_TOKEN }}@github.com" > ~/.git-credentials 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: | run: |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. .. chmod 755 .github/compiler.sh
cmake --build . --target install .github/compiler.sh
- name: Binary Archive - name: Binary Archive
run: | run: |