From 720c7c0af5333da98e7c9324e50bbd00c7c754b2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 14 Apr 2023 14:39:24 +0700 Subject: [PATCH] udpate --- .github/workflows/build-tdlib-cross.yml | 17 +- .../build-telegram-bot-api-cross.yml | 159 +----------------- 2 files changed, 5 insertions(+), 171 deletions(-) diff --git a/.github/workflows/build-tdlib-cross.yml b/.github/workflows/build-tdlib-cross.yml index 13e7532c..704b9086 100644 --- a/.github/workflows/build-tdlib-cross.yml +++ b/.github/workflows/build-tdlib-cross.yml @@ -370,21 +370,8 @@ jobs: mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=../tdlib .. - cmake --build . --target prepare_cross_compiling - cd .. - php SplitSource.php - cd build - cmake --build . --target install - cd .. - php SplitSource.php --undo - -# - name: fake build -# run: | -# mkdir -p tdlib/lib -# echo test > tdlib/lib/libtdjson.so.1.8.4 -# echo test > tdlib/lib/libtdjson.so -# rm tdlib/lib/libtdjson.so -# mv tdlib/lib/libtdjson.so.1.8.4 tdlib/lib/libtdjson.so + cmake --build . + - name: zip run: | diff --git a/.github/workflows/build-telegram-bot-api-cross.yml b/.github/workflows/build-telegram-bot-api-cross.yml index 7467fa6a..b57a5d7a 100644 --- a/.github/workflows/build-telegram-bot-api-cross.yml +++ b/.github/workflows/build-telegram-bot-api-cross.yml @@ -2,7 +2,7 @@ name: Build Telegram Bot Api Cross Platform on: [workflow_dispatch] jobs: build: - name: Build Telegram Bot Api + name: Build Apps runs-on: ${{ matrix.os }} strategy: matrix: @@ -21,7 +21,8 @@ jobs: with: repository: tdlib/telegram-bot-api submodules: true - - name: Install Dependencies + - name: Install Dependencies + continue-on-error: true run: | if [ "$RUNNER_OS" == "Linux" ]; then sudo apt update -y @@ -69,157 +70,3 @@ jobs: title: "Release Telegram Bot Api ${{ matrix.output-name }}" files: | build/telegram-bot-api - - - build-tdlib-desktop: - name: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04, windows-latest, macOS-latest] - include: - - os: ubuntu-20.04 - output-name: linux - - os: macOS-latest - output-name: macos - - os: windows-latest - output-name: windows - steps: - - name: Export Release Timestamp - run: echo "APP_VERSION=v$(date +'%Y.%m.%d.%H.%M.%S')" >> $GITHUB_ENV - - uses: actions/checkout@v3 - with: - repository: tdlib/td - - name: Install Dependencies - continue-on-error: true - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt update -y - sudo apt-get install -y make git zlib1g-dev libssl-dev gperf cmake clang libc++-dev libc++abi-dev ninja-build zip - fi - if [ "$RUNNER_OS" == "macOS" ]; then - brew update - brew upgrade - xcode-select --install - curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh - brew install gperf cmake openssl coreutils - fi - if [ "$RUNNER_OS" == "Windows" ]; then - git clone https://github.com/Microsoft/vcpkg.git - cd vcpkg - git checkout 1b1ae50e1a69f7c659bd7d731e80b358d21c86ad - ./bootstrap-vcpkg.bat - ./vcpkg.exe install gperf:x64-windows openssl:x64-windows zlib:x64-windows - fi - shell: bash - - name: Compile Tdlib - continue-on-error: true - run: | - mkdir build - cd build - if [ "$RUNNER_OS" == "Linux" ]; then - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=../tdlib .. - cmake --build . --target prepare_cross_compiling - cd .. - php SplitSource.php - cd build - cmake --build . --target install - cd .. - php SplitSource.php --undo - cd tdlib/lib - zip libtdjson.zip libtdjson.so - fi - if [ "$RUNNER_OS" == "macOS" ]; then - cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl/ -DCMAKE_INSTALL_PREFIX:PATH=../tdlib .. - cmake --build . --target install - fi - if [ "$RUNNER_OS" == "Windows" ]; then - cmake -A x64 -DCMAKE_INSTALL_PREFIX:PATH=../tdlib -DCMAKE_TOOLCHAIN_FILE:FILEPATH=../vcpkg/scripts/buildsystems/vcpkg.cmake .. - cmake --build . --target install --config Release - cd tdlib/bin - ls - mv libcrypto-1_1-x64.dll libcrypto-1_1.dll - mv libssl-1_1-x64.dll libssl-1_1.dll - 7z a -tzip dlls.zip libcrypto-1_1.dll libssl-1_1.dll tdjson.dll zlib1.dll - fi - shell: bash - - name: Publish Release - uses: marvinpinto/action-automatic-releases@latest - continue-on-error: true - with: - repo_token: "${{ github.token }}" - automatic_release_tag: "latest-tdlib-${{ matrix.output-name }}" - prerelease: false - title: "Release Tdlib ${{ matrix.output-name }}" - files: | - build/libtdjson.*.* - - build-tdlib-mobile: - name: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04, macOS-latest] - include: - - os: ubuntu-20.04 - output-name: android - - os: macOS-latest - output-name: ios - - steps: - - name: Export Release Timestamp - run: echo "APP_VERSION=v$(date +'%Y.%m.%d.%H.%M.%S')" >> $GITHUB_ENV - - uses: actions/checkout@v3 - with: - repository: tdlib/td - - name: Install Dependencies - continue-on-error: true - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt update -y - sudo apt-get install -y make git zlib1g-dev libssl-dev gperf cmake clang libc++-dev libc++abi-dev ninja-build zip - fi - if [ "$RUNNER_OS" == "macOS" ]; then - brew update - brew upgrade - xcode-select --install - curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh - brew install gperf cmake openssl coreutils - fi - if [ "$RUNNER_OS" == "Windows" ]; then - git clone https://github.com/Microsoft/vcpkg.git - cd vcpkg - git checkout 1b1ae50e1a69f7c659bd7d731e80b358d21c86ad - ./bootstrap-vcpkg.bat - ./vcpkg.exe install gperf:x64-windows openssl:x64-windows zlib:x64-windows - fi - shell: bash - - name: Compile Tdlib - continue-on-error: true - run: | - mkdir build - cd build - if [ "$RUNNER_OS" == "Linux" ]; then - cmake -DCMAKE_BUILD_TYPE=Release .. - cmake --build . - fi - if [ "$RUNNER_OS" == "macOS" ]; then - cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ .. - cmake --build . - fi - if [ "$RUNNER_OS" == "Windows" ]; then - cmake -A x64 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=../vcpkg/scripts/buildsystems/vcpkg.cmake .. - cmake --build . --config Release - fi - shell: bash - - name: Publish Release - uses: marvinpinto/action-automatic-releases@latest - continue-on-error: true - with: - repo_token: "${{ github.token }}" - automatic_release_tag: "latest-tdlib-${{ matrix.output-name }}" - prerelease: false - title: "Release Tdlib ${{ matrix.output-name }}" - files: | - build/libtdjson.*.* - \ No newline at end of file