| branches: |
| 6 | - dev |
| 7 | paths-ignore: |
| 8 | - '**.md' |
| 9 | - '.github/**' |
| 10 | - '!.github/workflows/debug.yml' |
| 11 |
| 12 | jobs: |
| 13 | check: |
| 14 | name: Check Access |
| 15 | runs-on: ubuntu-latest |
| 16 | steps: |
| 17 | - name: "Check access" |
| 18 | uses: "lannonbr/repo-permission-check-action@2.0.0" |
| 19 | with: |
| 20 | permission: "write" |
| 21 | env: |
| 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 23 | ffmpeg: |
| 24 | name: Native Build (FFmpeg) |
| 25 | runs-on: ubuntu-latest |
| 26 | needs: check |
| 27 | steps: |
| 28 | - name: Checkout |
| 29 | uses: actions/checkout@v2 |
| 30 | - name: Fetch Status |
| 31 | run: | |
| 32 | sed -i 's/\/\///g' settings.gradle |
| 33 | git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status |
| 34 | git submodule status TMessagesProj/jni/libvpx > libvpx_status |
| 35 | - name: FFmpeg Cache |
| 36 | id: cache |
| 37 | uses: actions/cache@v2 |
| 38 | with: |
| 39 | path: | |
| 40 | TMessagesProj/jni/ffmpeg/build |
| 41 | TMessagesProj/jni/libvpx/build |
| 42 | key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} |
| 43 | - name: Setup Android SDK Tools |
| 44 | uses: android-actions/setup-android@v2 |
| 45 | if: steps.cache.outputs.cache-hit != 'true' |
| 46 | - name: Install NDK |
| 47 | if: steps.cache.outputs.cache-hit != 'true' |
| 48 | run: | |
| 49 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 50 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 51 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 52 | - name: Native Build |
| 53 | if: steps.cache.outputs.cache-hit != 'true' |
| 54 | run: | |
| 55 | sudo apt-get install yasm -y |
| 56 | ./run init libs libvpx |
| 57 | ./run init libs ffmpeg |
| 58 | boringssl: |
| 59 | name: Native Build (BoringSSL) |
| 60 | runs-on: ubuntu-latest |
| 61 | needs: check |
| 62 | steps: |
| 63 | - name: Checkout |
| 64 | uses: actions/checkout@v2 |
| 65 | - name: Fetch Status |
| 66 | run: | |
| 67 | sed -i 's/\/\///g' settings.gradle |
| 68 | git submodule status TMessagesProj/jni/boringssl > boringssl_status |
| 69 | - name: BoringSSL Cache |
| 70 | id: cache |
| 71 | uses: actions/cache@v2 |
| 72 | with: |
| 73 | path: | |
| 74 | TMessagesProj/jni/boringssl/build |
| 75 | key: ${{ hashFiles('boringssl_status') }} |
| 76 | - name: Setup Android SDK Tools |
| 77 | uses: android-actions/setup-android@v2 |
| 78 | if: steps.cache.outputs.cache-hit != 'true' |
| 79 | - name: Install NDK |
| 80 | if: steps.cache.outputs.cache-hit != 'true' |
| 81 | run: | |
| 82 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 83 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 84 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 85 | - name: Native Build |
| 86 | if: steps.cache.outputs.cache-hit != 'true' |
| 87 | run: | |
| 88 | ./run init action boringssl |
| 89 | ./run init libs boringssl |
| 90 | native: |
| 91 | name: Native Build (Telegram) |
| 92 | runs-on: ubuntu-latest |
| 93 | needs: |
| 94 | - ffmpeg |
| 95 | - boringssl |
| 96 | strategy: |
| 97 | matrix: |
| 98 | flavor: |
| 99 | - armeabi-v7a |
| 100 | - arm64-v8a |
| 101 | steps: |
| 102 | - name: Checkout |
| 103 | uses: actions/checkout@v2 |
| 104 | - name: Fetch Status |
| 105 | run: | |
| 106 | sed -i 's/\/\///g' settings.gradle |
| 107 | git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status |
| 108 | git submodule status TMessagesProj/jni/libvpx > libvpx_status |
| 109 | git submodule status TMessagesProj/jni/boringssl > boringssl_status |
| 110 | - name: Native Cache |
| 111 | id: cache |
| 112 | uses: actions/cache@v2 |
| 113 | with: |
| 114 | path: | |
| 115 | TMessagesProj/src/main/libs |
| 116 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-${{ matrix.flavor }} |
| 117 | - name: Checkout Library |
| 118 | if: steps.cache.outputs.cache-hit != 'true' |
| 119 | run: | |
| 120 | git submodule update --init 'TMessagesProj/jni/*' |
| 121 | - name: FFmpeg Cache |
| 122 | uses: actions/cache@v2 |
| 123 | if: steps.cache.outputs.cache-hit != 'true' |
| 124 | with: |
| 125 | path: | |
| 126 | TMessagesProj/jni/ffmpeg/build |
| 127 | TMessagesProj/jni/libvpx/build |
| 128 | key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} |
| 129 | - name: BoringSSL Cache |
| 130 | uses: actions/cache@v2 |
| 131 | if: steps.cache.outputs.cache-hit != 'true' |
| 132 | with: |
| 133 | path: | |
| 134 | TMessagesProj/jni/boringssl/build |
| 135 | key: ${{ hashFiles('boringssl_status') }} |
| 136 | - name: Setup Android SDK Tools |
| 137 | uses: android-actions/setup-android@v2 |
| 138 | if: steps.cache.outputs.cache-hit != 'true' |
| 139 | - name: Install NDK |
| 140 | if: steps.cache.outputs.cache-hit != 'true' |
| 141 | run: | |
| 142 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 143 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 144 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 145 | - name: Fix BoringSSL |
| 146 | if: steps.cache.outputs.cache-hit != 'true' |
| 147 | run: | |
| 148 | cd TMessagesProj/jni |
| 149 | ./patch_boringssl.sh |
| 150 | - name: Native Build |
| 151 | if: steps.cache.outputs.cache-hit != 'true' |
| 152 | run: | |
| 153 | export NATIVE_TARGET="${{ matrix.flavor }}" |
| 154 | ./run libs native |
| 155 | v2ray: |
| 156 | name: Native Build (V2ray) |
| 157 | runs-on: ubuntu-latest |
| 158 | needs: check |
| 159 | steps: |
| 160 | - name: Checkout |
| 161 | uses: actions/checkout@v2 |
| 162 | - name: Fetch Status |
| 163 | run: | |
| 164 | sed -i 's/\/\///g' settings.gradle |
| 165 | git submodule status v2ray > v2ray_status |
| 166 | - name: V2ray Cache |
| 167 | id: cache |
| 168 | uses: actions/cache@v2 |
| 169 | with: |
| 170 | path: | |
| 171 | TMessagesProj/libs/libv2ray.aar |
| 172 | key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} |
| 173 | - name: Setup Android SDK Tools |
| 174 | uses: android-actions/setup-android@v2 |
| 175 | if: steps.cache.outputs.cache-hit != 'true' |
| 176 | - name: Install NDK |
| 177 | if: steps.cache.outputs.cache-hit != 'true' |
| 178 | run: | |
| 179 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 180 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 181 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 182 | - name: Install Golang |
| 183 | uses: actions/setup-go@v2 |
| 184 | if: steps.cache.outputs.cache-hit != 'true' |
| 185 | with: |
| 186 | go-version: 1.16 |
| 187 | - name: Native Build |
| 188 | if: steps.cache.outputs.cache-hit != 'true' |
| 189 | run: ./run libs v2ray |
| 190 | shadowsocks: |
| 191 | name: Native Build (Shadowsocks) |
| 192 | runs-on: ubuntu-latest |
| 193 | needs: check |
| 194 | steps: |
| 195 | - name: Checkout |
| 196 | uses: actions/checkout@v2 |
| 197 | - name: Fetch Status |
| 198 | run: | |
| 199 | sed -i 's/\/\///g' settings.gradle |
| 200 | git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status |
| 201 | - name: Shadowsocks Cache |
| 202 | id: cache |
| 203 | uses: actions/cache@v2 |
| 204 | with: |
| 205 | path: | |
| 206 | TMessagesProj/libs/ss-rust-release.aar |
| 207 | key: ${{ hashFiles('shadowsocks_status') }} |
| 208 | - name: Setup Android SDK Tools |
| 209 | uses: android-actions/setup-android@v2 |
| 210 | if: steps.cache.outputs.cache-hit != 'true' |
| 211 | - name: Install NDK |
| 212 | if: steps.cache.outputs.cache-hit != 'true' |
| 213 | run: | |
| 214 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 215 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 216 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 217 | - name: Install Rust |
| 218 | if: steps.cache.outputs.cache-hit != 'true' |
| 219 | run: ./run init action shadowsocks |
| 220 | - name: Native Build |
| 221 | if: steps.cache.outputs.cache-hit != 'true' |
| 222 | run: ./run libs shadowsocks |
| 223 | shadowsocksr: |
| 224 | name: Native Build (ShadowsocksR) |
| 225 | runs-on: ubuntu-latest |
| 226 | needs: check |
| 227 | steps: |
| 228 | - name: Checkout |
| 229 | uses: actions/checkout@v2 |
| 230 | - name: Fetch Status |
| 231 | run: | |
| 232 | sed -i 's/\/\///g' settings.gradle |
| 233 | git submodule status 'ssr-libev/*' > shadowsocksr_status |
| 234 | - name: ShadowsocksR Cache |
| 235 | id: cache |
| 236 | uses: actions/cache@v2 |
| 237 | with: |
| 238 | path: | |
| 239 | TMessagesProj/libs/ssr-libev-release.aar |
| 240 | key: ${{ hashFiles('shadowsocksr_status') }} |
| 241 | - name: Setup Android SDK Tools |
| 242 | uses: android-actions/setup-android@v2 |
| 243 | if: steps.cache.outputs.cache-hit != 'true' |
| 244 | - name: Install NDK |
| 245 | if: steps.cache.outputs.cache-hit != 'true' |
| 246 | run: | |
| 247 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 248 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 249 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 250 | - name: Native Build |
| 251 | if: steps.cache.outputs.cache-hit != 'true' |
| 252 | run: ./run libs ssr |
| 253 | build: |
| 254 | name: Gradle Build |
| 255 | runs-on: ubuntu-latest |
| 256 | needs: |
| 257 | - native |
| 258 | - v2ray |
| 259 | - shadowsocks |
| 260 | - shadowsocksr |
| 261 | strategy: |
| 262 | matrix: |
| 263 | flavor: |
| 264 | - FullRelease |
| 265 | - MiniRelease |
| 266 | steps: |
| 267 | - name: Checkout |
| 268 | uses: actions/checkout@v2 |
| 269 | - name: Setup Android SDK Tools |
| 270 | uses: android-actions/setup-android@v2 |
| 271 | - name: Install NDK |
| 272 | run: | |
| 273 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 274 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 275 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 276 | - name: Fetch Status |
| 277 | run: | |
| 278 | sed -i 's/\/\///g' settings.gradle |
| 279 | git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status |
| 280 | git submodule status TMessagesProj/jni/boringssl > boringssl_status |
| 281 | git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status |
| 282 | git submodule status 'ssr-libev/*' > shadowsocksr_status |
| 283 | git submodule status v2ray > v2ray_status |
| 284 | - name: Native Cache (armeabi-v7a) |
| 285 | uses: actions/cache@v2 |
| 286 | with: |
| 287 | path: | |
| 288 | TMessagesProj/src/main/libs |
| 289 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a |
| 290 | - name: Native Cache (arm64-v8a) |
| 291 | uses: actions/cache@v2 |
| 292 | with: |
| 293 | path: | |
| 294 | TMessagesProj/src/main/libs |
| 295 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a |
| 296 | - name: V2ray Cache |
| 297 | uses: actions/cache@v2 |
| 298 | with: |
| 299 | path: | |
| 300 | TMessagesProj/libs/libv2ray.aar |
| 301 | key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} |
| 302 | - name: Shadowsocks Cache |
| 303 | uses: actions/cache@v2 |
| 304 | with: |
| 305 | path: | |
| 306 | TMessagesProj/libs/ss-rust-release.aar |
| 307 | key: ${{ hashFiles('shadowsocks_status') }} |
| 308 | - name: ShadowsocksR Cache |
| 309 | uses: actions/cache@v2 |
| 310 | with: |
| 311 | path: | |
| 312 | TMessagesProj/libs/ssr-libev-release.aar |
| 313 | key: ${{ hashFiles('shadowsocksr_status') }} |
| 314 | - name: Configure Gradle |
| 315 | run: | |
| 316 | sed -i -e "s/16384/6144/g" gradle.properties |
| 317 | echo "sdk.dir=${ANDROID_HOME}" >> local.properties |
| 318 | - name: Gradle cache |
| 319 | uses: actions/cache@v2 |
| 320 | with: |
| 321 | path: ~/.gradle |
| 322 | key: gradle-${{ hashFiles('**/*.gradle') }} |
| 323 | - name: Debug Build |
| 324 | run: | |
| 325 | export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" |
| 326 | export DEBUG_BUILD=true |
| 327 | ./gradlew TMessagesProj:assemble${{ matrix.flavor }} |
| 328 |
| 329 | APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk') |
| 330 | APK=$(dirname $APK) |
| 331 | echo "APK=$APK" >> $GITHUB_ENV |
| 332 | - uses: actions/upload-artifact@v2 |
| 333 | with: |
| 334 | name: ${{ matrix.flavor }} |
| 335 | path: ${{ env.APK }} |
| 336 | build-nogcm: |
| 337 | name: Gradle Build (nogcm) |
| 338 | runs-on: ubuntu-latest |
| 339 | needs: |
| 340 | - native |
| 341 | - v2ray |
| 342 | - shadowsocks |
| 343 | - shadowsocksr |
| 344 | - build |
| 345 | strategy: |
| 346 | matrix: |
| 347 | flavor: |
| 348 | - FullReleaseNoGcm |
| 349 | - MiniReleaseNoGcm |
| 350 | steps: |
| 351 | - name: Checkout |
| 352 | uses: actions/checkout@v2 |
| 353 | - name: Setup Android SDK Tools |
| 354 | uses: android-actions/setup-android@v2 |
| 355 | - name: Install NDK |
| 356 | run: | |
| 357 | echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 358 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 359 | echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties |
| 360 | - name: Fetch Status |
| 361 | run: | |
| 362 | sed -i 's/\/\///g' settings.gradle |
| 363 | git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status |
| 364 | git submodule status TMessagesProj/jni/boringssl > boringssl_status |
| 365 | git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status |
| 366 | git submodule status 'ssr-libev/*' > shadowsocksr_status |
| 367 | git submodule status v2ray > v2ray_status |
| 368 | - name: Native Cache (armeabi-v7a) |
| 369 | uses: actions/cache@v2 |
| 370 | with: |
| 371 | path: | |
| 372 | TMessagesProj/src/main/libs |
| 373 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a |
| 374 | - name: Native Cache (arm64-v8a) |
| 375 | uses: actions/cache@v2 |
| 376 | with: |
| 377 | path: | |
| 378 | TMessagesProj/src/main/libs |
| 379 | key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a |
| 380 | - name: V2ray Cache |
| 381 | uses: actions/cache@v2 |
| 382 | with: |
| 383 | path: | |
| 384 | TMessagesProj/libs/libv2ray.aar |
| 385 | key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} |
| 386 | - name: Shadowsocks Cache |
| 387 | uses: actions/cache@v2 |
| 388 | with: |
| 389 | path: | |
| 390 | TMessagesProj/libs/ss-rust-release.aar |
| 391 | key: ${{ hashFiles('shadowsocks_status') }} |
| 392 | - name: ShadowsocksR Cache |
| 393 | uses: actions/cache@v2 |
| 394 | with: |
| 395 | path: | |
| 396 | TMessagesProj/libs/ssr-libev-release.aar |
| 397 | key: ${{ hashFiles('shadowsocksr_status') }} |
| 398 | - name: Configure Gradle |
| 399 | run: | |
| 400 | sed -i -e "s/16384/6144/g" gradle.properties |
| 401 | echo "sdk.dir=${ANDROID_HOME}" >> local.properties |
| 402 | - name: Gradle cache |
| 403 | uses: actions/cache@v2 |
| 404 | with: |
| 405 | path: ~/.gradle |
| 406 | key: gradle-${{ hashFiles('**/*.gradle') }} |
| 407 | - name: Debug Build |
| 408 | run: | |
| 409 | export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" |
| 410 | export DEBUG_BUILD=true |
| 411 | ./gradlew TMessagesProj:assemble${{ matrix.flavor }} |
| 412 |
| 413 | APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk') |
| 414 | APK=$(dirname $APK) |
| 415 | echo "APK=$APK" >> $GITHUB_ENV |
| 416 | - uses: actions/upload-artifact@v2 |
| 417 | with: |
| 418 | name: ${{ matrix.flavor }} |
| 419 | path: ${{ env.APK }} |
| 420 | upload: |
| 421 | name: Upload debug |
| 422 | runs-on: ubuntu-latest |
| 423 | if: ${{ !contains(github.event.head_commit.message, 'bump version') }} |
| 424 | needs: |
| 425 | - build |
| 426 | - build-nogcm |
| 427 | - telegram-bot-api |
| 428 | steps: |
| 429 | - name: Donwload Artifacts |
| 430 | uses: actions/download-artifact@v2 |
| 431 | with: |
| 432 | path: artifacts |
| 433 | - name: Download Telegram Bot API Binary |
| 434 | uses: actions/download-artifact@master |
| 435 | with: |
| 436 | name: telegram-bot-api-binary |
| 437 | path: . |
| 438 | - name: Send to Telegram |
| 439 | run: | |
| 440 | chmod +x telegram-bot-api-binary |
| 441 | function start() { |
| 442 | ./telegram-bot-api-binary --api-id=11535358 --api-hash=33d372962fadb01df47e6ceed4e33cd6 --local 2>&1 > /dev/null & |
| 443 | } |
| 444 | start |
| 445 | curl http://127.0.0.1:8081/ || start |
| 446 | curl http://127.0.0.1:8081/ || start |
| 447 | curl http://127.0.0.1:8081/ || start |
| 448 | # send release via telegram bot api |
| 449 | export mini64=$(find artifacts -name "*mini-arm64-v8a.apk") |
| 450 | export mini32=$(find artifacts -name "*mini-armeabi-v7a.apk") |
| 451 | export full64=$(find artifacts -name "*full-arm64-v8a.apk") |
| 452 | export full32=$(find artifacts -name "*full-armeabi-v7a.apk") |
| 453 | export mini64nogcm=$(find artifacts -name "*mini-arm64-v8aNoGcm.apk") |
| 454 | export mini32nogcm=$(find artifacts -name "*mini-armeabi-v7aNoGcm.apk") |
| 455 | export full64nogcm=$(find artifacts -name "*full-arm64-v8aNoGcm.apk") |
| 456 | export full32nogcm=$(find artifacts -name "*full-armeabi-v7aNoGcm.apk") |
| 457 |
| 458 | echo $mini64 |
| 459 | echo $mini32 |
| 460 | echo $full64 |
| 461 | echo $full32 |
| 462 | echo $mini64nogcm |
| 463 | echo $mini32nogcm |
| 464 | echo $full64nogcm |
| 465 | echo $full32nogcm |
| 466 |
| 467 | curl --http0.9 http://127.0.0.1:8081/bot${{ secrets.HELPER_BOT_TOKEN }}/sendMediaGroup --form-string chat_id=${{ secrets.HELPER_BOT_TARGET }} --form apk1=@"${mini64}" --form apk2=@"${mini32}" --form apk3=@"${full64}" --form apk4=@"${full32}" --form apk5=@"${mini64nogcm}" --form apk6=@"${mini32nogcm}" --form apk7=@"${full64nogcm}" --form apk8=@"${full32nogcm}" --form-string media="[{\"type\": \"document\",\"media\": \"attach://apk1\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk2\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk3\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk4\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk5\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk6\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk7\",\"caption\": \"\",\"parse_mode\": \"Markdown\"},{\"type\": \"document\",\"media\": \"attach://apk8\",\"caption\": \"Test version, ${{ github.event.head_commit.message }}\",\"parse_mode\": \"Markdown\"}]" --verbose >/dev/null |
| 468 |
| 469 | pkill telegram-bot |
| 470 | telegram-bot-api: |
| 471 | name: Telegram Bot API |
| 472 | runs-on: ubuntu-latest |
| 473 | steps: |
| 474 | - name: Checkout |
| 475 | uses: actions/checkout@v2 |
| 476 | - name: Clone Telegram Bot API |
| 477 | run: | |
| 478 | git clone --recursive https://github.com/tdlib/telegram-bot-api.git |
| 479 | git status telegram-bot-api >> telegram-bot-api-status |
| 480 | - name: Cache Bot API Binary |
| 481 | id: cache-bot-api |
| 482 | uses: actions/cache@v2 |
| 483 | with: |
| 484 | path: telegram-bot-api-binary |
| 485 | key: CI-telegram-bot-api-${{ hashFiles('telegram-bot-api-status') }} |
| 486 | - name: Compile Telegram Bot API |
| 487 | if: steps.cache-bot-api.outputs.cache-hit != 'true' |
| 488 | run: | |
| 489 | sudo apt-get update |
| 490 | sudo apt-get install make git zlib1g-dev libssl-dev gperf cmake g++ |
| 491 | cd telegram-bot-api |
| 492 | rm -rf build |
| 493 | mkdir build |
| 494 | cd build |
| 495 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. .. |
| 496 | cmake --build . --target install -j$(nproc) |
| 497 | cd ../.. |
| 498 | ls -l telegram-bot-api/bin/telegram-bot-api* |
| 499 | cp telegram-bot-api/bin/telegram-bot-api telegram-bot-api-binary |
| 500 | - name: Upload Binary |
| 501 | uses: actions/upload-artifact@master |
| 502 | with: |
| 503 | name: telegram-bot-api-binary |
| 504 | path: telegram-bot-api-binary |
| 505 |