diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 7479accef8..d3a167229d 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -152,200 +152,117 @@ jobs: run: | export NATIVE_TARGET="${{ matrix.flavor }}" ./run libs native - v2ray: - name: Native Build (V2ray) - runs-on: ubuntu-latest - needs: check - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Fetch Status - run: | - sed -i 's/\/\///g' settings.gradle - git submodule status v2ray > v2ray_status - - name: V2ray Cache - id: cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/libv2ray.aar - key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} - - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 - if: steps.cache.outputs.cache-hit != 'true' - - name: Install NDK - if: steps.cache.outputs.cache-hit != 'true' - run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null - echo "sdk.dir=${ANDROID_HOME}" > local.properties - echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - - name: Install Golang - uses: actions/setup-go@v2 - if: steps.cache.outputs.cache-hit != 'true' - with: - go-version: 1.16 - - name: Native Build - if: steps.cache.outputs.cache-hit != 'true' - run: ./run libs v2ray - shadowsocks: - name: Native Build (Shadowsocks) - runs-on: ubuntu-latest - needs: check - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Fetch Status - run: | - sed -i 's/\/\///g' settings.gradle - git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status - - name: Shadowsocks Cache - id: cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/ss-rust-release.aar - key: ${{ hashFiles('shadowsocks_status') }} - - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 - if: steps.cache.outputs.cache-hit != 'true' - - name: Install NDK - if: steps.cache.outputs.cache-hit != 'true' - run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null - echo "sdk.dir=${ANDROID_HOME}" > local.properties - echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - - name: Install Rust - if: steps.cache.outputs.cache-hit != 'true' - run: ./run init action shadowsocks - - name: Native Build - if: steps.cache.outputs.cache-hit != 'true' - run: ./run libs shadowsocks - shadowsocksr: - name: Native Build (ShadowsocksR) - runs-on: ubuntu-latest - needs: check - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Fetch Status - run: | - sed -i 's/\/\///g' settings.gradle - git submodule status 'ssr-libev/*' > shadowsocksr_status - - name: ShadowsocksR Cache - id: cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/ssr-libev-release.aar - key: ${{ hashFiles('shadowsocksr_status') }} - - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 - if: steps.cache.outputs.cache-hit != 'true' - - name: Install NDK - if: steps.cache.outputs.cache-hit != 'true' - run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null - echo "sdk.dir=${ANDROID_HOME}" > local.properties - echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - - name: Native Build - if: steps.cache.outputs.cache-hit != 'true' - run: ./run libs ssr +# v2ray: +# name: Native Build (V2ray) +# runs-on: ubuntu-latest +# needs: check +# steps: +# - name: Checkout +# uses: actions/checkout@v2 +# - name: Fetch Status +# run: | +# sed -i 's/\/\///g' settings.gradle +# git submodule status v2ray > v2ray_status +# - name: V2ray Cache +# id: cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/libv2ray.aar +# key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} +# - name: Setup Android SDK Tools +# uses: android-actions/setup-android@v2 +# if: steps.cache.outputs.cache-hit != 'true' +# - name: Install NDK +# if: steps.cache.outputs.cache-hit != 'true' +# run: | +# echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null +# echo "sdk.dir=${ANDROID_HOME}" > local.properties +# echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties +# - name: Install Golang +# uses: actions/setup-go@v2 +# if: steps.cache.outputs.cache-hit != 'true' +# with: +# go-version: 1.16 +# - name: Native Build +# if: steps.cache.outputs.cache-hit != 'true' +# run: ./run libs v2ray +# shadowsocks: +# name: Native Build (Shadowsocks) +# runs-on: ubuntu-latest +# needs: check +# steps: +# - name: Checkout +# uses: actions/checkout@v2 +# - name: Fetch Status +# run: | +# sed -i 's/\/\///g' settings.gradle +# git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status +# - name: Shadowsocks Cache +# id: cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/ss-rust-release.aar +# key: ${{ hashFiles('shadowsocks_status') }} +# - name: Setup Android SDK Tools +# uses: android-actions/setup-android@v2 +# if: steps.cache.outputs.cache-hit != 'true' +# - name: Install NDK +# if: steps.cache.outputs.cache-hit != 'true' +# run: | +# echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null +# echo "sdk.dir=${ANDROID_HOME}" > local.properties +# echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties +# - name: Install Rust +# if: steps.cache.outputs.cache-hit != 'true' +# run: ./run init action shadowsocks +# - name: Native Build +# if: steps.cache.outputs.cache-hit != 'true' +# run: ./run libs shadowsocks +# shadowsocksr: +# name: Native Build (ShadowsocksR) +# runs-on: ubuntu-latest +# needs: check +# steps: +# - name: Checkout +# uses: actions/checkout@v2 +# - name: Fetch Status +# run: | +# sed -i 's/\/\///g' settings.gradle +# git submodule status 'ssr-libev/*' > shadowsocksr_status +# - name: ShadowsocksR Cache +# id: cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/ssr-libev-release.aar +# key: ${{ hashFiles('shadowsocksr_status') }} +# - name: Setup Android SDK Tools +# uses: android-actions/setup-android@v2 +# if: steps.cache.outputs.cache-hit != 'true' +# - name: Install NDK +# if: steps.cache.outputs.cache-hit != 'true' +# run: | +# echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null +# echo "sdk.dir=${ANDROID_HOME}" > local.properties +# echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties +# - name: Native Build +# if: steps.cache.outputs.cache-hit != 'true' +# run: ./run libs ssr build: name: Gradle Build runs-on: ubuntu-latest needs: - native - - v2ray - - shadowsocks - - shadowsocksr +# - v2ray +# - shadowsocks +# - shadowsocksr strategy: matrix: flavor: - - FullRelease +# - FullRelease - MiniRelease - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 - - name: Install NDK - run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null - echo "sdk.dir=${ANDROID_HOME}" > local.properties - echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - - name: Fetch Status - run: | - sed -i 's/\/\///g' settings.gradle - git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status - git submodule status TMessagesProj/jni/boringssl > boringssl_status - git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status - git submodule status 'ssr-libev/*' > shadowsocksr_status - git submodule status v2ray > v2ray_status - - name: Native Cache (armeabi-v7a) - uses: actions/cache@v2 - with: - path: | - TMessagesProj/src/main/libs - key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a - - name: Native Cache (arm64-v8a) - uses: actions/cache@v2 - with: - path: | - TMessagesProj/src/main/libs - key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a - - name: V2ray Cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/libv2ray.aar - key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} - - name: Shadowsocks Cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/ss-rust-release.aar - key: ${{ hashFiles('shadowsocks_status') }} - - name: ShadowsocksR Cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/ssr-libev-release.aar - key: ${{ hashFiles('shadowsocksr_status') }} - - name: Configure Gradle - run: | - sed -i -e "s/16384/6144/g" gradle.properties - echo "sdk.dir=${ANDROID_HOME}" >> local.properties - - name: Gradle cache - uses: actions/cache@v2 - with: - path: ~/.gradle - key: gradle-${{ hashFiles('**/*.gradle') }} - - name: Debug Build - run: | - export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" - export DEBUG_BUILD=true - ./gradlew TMessagesProj:assemble${{ matrix.flavor }} - - APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk') - APK=$(dirname $APK) - echo "APK=$APK" >> $GITHUB_ENV - - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.flavor }} - path: ${{ env.APK }} - build-nogcm: - name: Gradle Build (nogcm) - runs-on: ubuntu-latest - needs: - - native - - v2ray - - shadowsocks - - shadowsocksr - - build - strategy: - matrix: - flavor: - - FullReleaseNoGcm - MiniReleaseNoGcm steps: - name: Checkout @@ -362,9 +279,9 @@ jobs: sed -i 's/\/\///g' settings.gradle git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status git submodule status TMessagesProj/jni/boringssl > boringssl_status - git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status - git submodule status 'ssr-libev/*' > shadowsocksr_status - git submodule status v2ray > v2ray_status +# git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status +# git submodule status 'ssr-libev/*' > shadowsocksr_status +# git submodule status v2ray > v2ray_status - name: Native Cache (armeabi-v7a) uses: actions/cache@v2 with: @@ -377,24 +294,24 @@ jobs: path: | TMessagesProj/src/main/libs key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a - - name: V2ray Cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/libv2ray.aar - key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} - - name: Shadowsocks Cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/ss-rust-release.aar - key: ${{ hashFiles('shadowsocks_status') }} - - name: ShadowsocksR Cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/ssr-libev-release.aar - key: ${{ hashFiles('shadowsocksr_status') }} +# - name: V2ray Cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/libv2ray.aar +# key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} +# - name: Shadowsocks Cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/ss-rust-release.aar +# key: ${{ hashFiles('shadowsocks_status') }} +# - name: ShadowsocksR Cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/ssr-libev-release.aar +# key: ${{ hashFiles('shadowsocksr_status') }} - name: Configure Gradle run: | sed -i -e "s/16384/6144/g" gradle.properties @@ -417,13 +334,97 @@ jobs: with: name: ${{ matrix.flavor }} path: ${{ env.APK }} +# build-nogcm: +# name: Gradle Build (nogcm) +# runs-on: ubuntu-latest +# needs: +# - native +# - v2ray +# - shadowsocks +# - shadowsocksr +# - build +# strategy: +# matrix: +# flavor: +# - FullReleaseNoGcm +# - MiniReleaseNoGcm +# steps: +# - name: Checkout +# uses: actions/checkout@v2 +# - name: Setup Android SDK Tools +# uses: android-actions/setup-android@v2 +# - name: Install NDK +# run: | +# echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null +# echo "sdk.dir=${ANDROID_HOME}" > local.properties +# echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties +# - name: Fetch Status +# run: | +# sed -i 's/\/\///g' settings.gradle +# git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status +# git submodule status TMessagesProj/jni/boringssl > boringssl_status +# git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status +# git submodule status 'ssr-libev/*' > shadowsocksr_status +# git submodule status v2ray > v2ray_status +# - name: Native Cache (armeabi-v7a) +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/src/main/libs +# key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-armeabi-v7a +# - name: Native Cache (arm64-v8a) +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/src/main/libs +# key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a +# - name: V2ray Cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/libv2ray.aar +# key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} +# - name: Shadowsocks Cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/ss-rust-release.aar +# key: ${{ hashFiles('shadowsocks_status') }} +# - name: ShadowsocksR Cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/ssr-libev-release.aar +# key: ${{ hashFiles('shadowsocksr_status') }} +# - name: Configure Gradle +# run: | +# sed -i -e "s/16384/6144/g" gradle.properties +# echo "sdk.dir=${ANDROID_HOME}" >> local.properties +# - name: Gradle cache +# uses: actions/cache@v2 +# with: +# path: ~/.gradle +# key: gradle-${{ hashFiles('**/*.gradle') }} +# - name: Debug Build +# run: | +# export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" +# export DEBUG_BUILD=true +# ./gradlew TMessagesProj:assemble${{ matrix.flavor }} +# +# APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk') +# APK=$(dirname $APK) +# echo "APK=$APK" >> $GITHUB_ENV +# - uses: actions/upload-artifact@v2 +# with: +# name: ${{ matrix.flavor }} +# path: ${{ env.APK }} upload: name: Upload debug runs-on: ubuntu-latest if: ${{ !contains(github.event.head_commit.message, 'bump version') }} needs: - build - - build-nogcm +# - build-nogcm - telegram-bot-api steps: - name: Donwload Artifacts @@ -448,23 +449,23 @@ jobs: # send release via telegram bot api export mini64=$(find artifacts -name "*mini-arm64-v8a.apk") export mini32=$(find artifacts -name "*mini-armeabi-v7a.apk") - export full64=$(find artifacts -name "*full-arm64-v8a.apk") - export full32=$(find artifacts -name "*full-armeabi-v7a.apk") +# export full64=$(find artifacts -name "*full-arm64-v8a.apk") +# export full32=$(find artifacts -name "*full-armeabi-v7a.apk") export mini64nogcm=$(find artifacts -name "*mini-arm64-v8aNoGcm.apk") export mini32nogcm=$(find artifacts -name "*mini-armeabi-v7aNoGcm.apk") - export full64nogcm=$(find artifacts -name "*full-arm64-v8aNoGcm.apk") - export full32nogcm=$(find artifacts -name "*full-armeabi-v7aNoGcm.apk") +# export full64nogcm=$(find artifacts -name "*full-arm64-v8aNoGcm.apk") +# export full32nogcm=$(find artifacts -name "*full-armeabi-v7aNoGcm.apk") echo $mini64 echo $mini32 - echo $full64 - echo $full32 +# echo $full64 +# echo $full32 echo $mini64nogcm echo $mini32nogcm - echo $full64nogcm - echo $full32nogcm +# echo $full64nogcm +# echo $full32nogcm - 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 + 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=@"${mini64nogcm}" --form apk4=@"${mini32nogcm}" --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 pkill telegram-bot telegram-bot-api: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 34bc2a35cf..cc92cb3d78 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -155,118 +155,118 @@ jobs: run: | export NATIVE_TARGET="${{ matrix.flavor }}" ./run libs native - v2ray: - name: Native Build (V2ray) - runs-on: ubuntu-latest - needs: check - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Fetch Status - run: | - sed -i 's/\/\///g' settings.gradle - git submodule status v2ray > v2ray_status - - name: V2ray Cache - id: cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/libv2ray.aar - key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} - - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 - if: steps.cache.outputs.cache-hit != 'true' - - name: Install NDK - if: steps.cache.outputs.cache-hit != 'true' - run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null - echo "sdk.dir=${ANDROID_HOME}" > local.properties - echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - - name: Install Golang - uses: actions/setup-go@v4 - if: steps.cache.outputs.cache-hit != 'true' - with: - go-version: 1.16 - - name: Native Build - if: steps.cache.outputs.cache-hit != 'true' - run: ./run libs v2ray - shadowsocks: - name: Native Build (Shadowsocks) - runs-on: ubuntu-latest - needs: check - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Fetch Status - run: | - sed -i 's/\/\///g' settings.gradle - git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status - - name: Shadowsocks Cache - id: cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/ss-rust-release.aar - key: ${{ hashFiles('shadowsocks_status') }} - - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 - if: steps.cache.outputs.cache-hit != 'true' - - name: Install NDK - if: steps.cache.outputs.cache-hit != 'true' - run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null - echo "sdk.dir=${ANDROID_HOME}" > local.properties - echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - - name: Install Rust - if: steps.cache.outputs.cache-hit != 'true' - run: ./run init action shadowsocks - - name: Native Build - if: steps.cache.outputs.cache-hit != 'true' - run: ./run libs shadowsocks - shadowsocksr: - name: Native Build (ShadowsocksR) - runs-on: ubuntu-latest - needs: check - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Fetch Status - run: | - sed -i 's/\/\///g' settings.gradle - git submodule status 'ssr-libev/*' > shadowsocksr_status - - name: ShadowsocksR Cache - id: cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/ssr-libev-release.aar - key: ${{ hashFiles('shadowsocksr_status') }} - - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 - if: steps.cache.outputs.cache-hit != 'true' - - name: Install NDK - if: steps.cache.outputs.cache-hit != 'true' - run: | - echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null - echo "sdk.dir=${ANDROID_HOME}" > local.properties - echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties - - name: Native Build - if: steps.cache.outputs.cache-hit != 'true' - run: ./run libs ssr +# v2ray: +# name: Native Build (V2ray) +# runs-on: ubuntu-latest +# needs: check +# steps: +# - name: Checkout +# uses: actions/checkout@v2 +# - name: Fetch Status +# run: | +# sed -i 's/\/\///g' settings.gradle +# git submodule status v2ray > v2ray_status +# - name: V2ray Cache +# id: cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/libv2ray.aar +# key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} +# - name: Setup Android SDK Tools +# uses: android-actions/setup-android@v2 +# if: steps.cache.outputs.cache-hit != 'true' +# - name: Install NDK +# if: steps.cache.outputs.cache-hit != 'true' +# run: | +# echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null +# echo "sdk.dir=${ANDROID_HOME}" > local.properties +# echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties +# - name: Install Golang +# uses: actions/setup-go@v4 +# if: steps.cache.outputs.cache-hit != 'true' +# with: +# go-version: 1.16 +# - name: Native Build +# if: steps.cache.outputs.cache-hit != 'true' +# run: ./run libs v2ray +# shadowsocks: +# name: Native Build (Shadowsocks) +# runs-on: ubuntu-latest +# needs: check +# steps: +# - name: Checkout +# uses: actions/checkout@v2 +# - name: Fetch Status +# run: | +# sed -i 's/\/\///g' settings.gradle +# git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status +# - name: Shadowsocks Cache +# id: cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/ss-rust-release.aar +# key: ${{ hashFiles('shadowsocks_status') }} +# - name: Setup Android SDK Tools +# uses: android-actions/setup-android@v2 +# if: steps.cache.outputs.cache-hit != 'true' +# - name: Install NDK +# if: steps.cache.outputs.cache-hit != 'true' +# run: | +# echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null +# echo "sdk.dir=${ANDROID_HOME}" > local.properties +# echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties +# - name: Install Rust +# if: steps.cache.outputs.cache-hit != 'true' +# run: ./run init action shadowsocks +# - name: Native Build +# if: steps.cache.outputs.cache-hit != 'true' +# run: ./run libs shadowsocks +# shadowsocksr: +# name: Native Build (ShadowsocksR) +# runs-on: ubuntu-latest +# needs: check +# steps: +# - name: Checkout +# uses: actions/checkout@v2 +# - name: Fetch Status +# run: | +# sed -i 's/\/\///g' settings.gradle +# git submodule status 'ssr-libev/*' > shadowsocksr_status +# - name: ShadowsocksR Cache +# id: cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/ssr-libev-release.aar +# key: ${{ hashFiles('shadowsocksr_status') }} +# - name: Setup Android SDK Tools +# uses: android-actions/setup-android@v2 +# if: steps.cache.outputs.cache-hit != 'true' +# - name: Install NDK +# if: steps.cache.outputs.cache-hit != 'true' +# run: | +# echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null +# echo "sdk.dir=${ANDROID_HOME}" > local.properties +# echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties +# - name: Native Build +# if: steps.cache.outputs.cache-hit != 'true' +# run: ./run libs ssr build: name: Gradle Build runs-on: ubuntu-latest needs: - native - - v2ray - - shadowsocks - - shadowsocksr +# - v2ray +# - shadowsocks +# - shadowsocksr strategy: matrix: flavor: - - FullRelease +# - FullRelease - MiniRelease - - FullReleaseNoGcm +# - FullReleaseNoGcm - MiniReleaseNoGcm steps: - name: Checkout @@ -283,9 +283,9 @@ jobs: sed -i 's/\/\///g' settings.gradle git submodule status TMessagesProj/jni/ffmpeg > ffmpeg_status git submodule status TMessagesProj/jni/boringssl > boringssl_status - git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status - git submodule status 'ssr-libev/*' > shadowsocksr_status - git submodule status v2ray > v2ray_status +# git submodule status ss-rust/src/main/rust/shadowsocks-rust > shadowsocks_status +# git submodule status 'ssr-libev/*' > shadowsocksr_status +# git submodule status v2ray > v2ray_status - name: Native Cache (armeabi-v7a) uses: actions/cache@v2 with: @@ -298,24 +298,24 @@ jobs: path: | TMessagesProj/src/main/libs key: ${{ hashFiles('TMessagesProj/jni/**', 'ffmpeg_status', 'boringssl_status') }}-arm64-v8a - - name: V2ray Cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/libv2ray.aar - key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} - - name: Shadowsocks Cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/ss-rust-release.aar - key: ${{ hashFiles('shadowsocks_status') }} - - name: ShadowsocksR Cache - uses: actions/cache@v2 - with: - path: | - TMessagesProj/libs/ssr-libev-release.aar - key: ${{ hashFiles('shadowsocksr_status') }} +# - name: V2ray Cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/libv2ray.aar +# key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} +# - name: Shadowsocks Cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/ss-rust-release.aar +# key: ${{ hashFiles('shadowsocks_status') }} +# - name: ShadowsocksR Cache +# uses: actions/cache@v2 +# with: +# path: | +# TMessagesProj/libs/ssr-libev-release.aar +# key: ${{ hashFiles('shadowsocksr_status') }} - name: Configure Gradle run: | sed -i -e "s/16384/6144/g" gradle.properties @@ -367,23 +367,23 @@ jobs: # send release via telegram bot api export mini64=$(find artifacts -name "*mini-arm64-v8a.apk") export mini32=$(find artifacts -name "*mini-armeabi-v7a.apk") - export full64=$(find artifacts -name "*full-arm64-v8a.apk") - export full32=$(find artifacts -name "*full-armeabi-v7a.apk") +# export full64=$(find artifacts -name "*full-arm64-v8a.apk") +# export full32=$(find artifacts -name "*full-armeabi-v7a.apk") export mini64nogcm=$(find artifacts -name "*mini-arm64-v8aNoGcm.apk") export mini32nogcm=$(find artifacts -name "*mini-armeabi-v7aNoGcm.apk") - export full64nogcm=$(find artifacts -name "*full-arm64-v8aNoGcm.apk") - export full32nogcm=$(find artifacts -name "*full-armeabi-v7aNoGcm.apk") +# export full64nogcm=$(find artifacts -name "*full-arm64-v8aNoGcm.apk") +# export full32nogcm=$(find artifacts -name "*full-armeabi-v7aNoGcm.apk") echo $mini64 echo $mini32 - echo $full64 - echo $full32 +# echo $full64 +# echo $full32 echo $mini64nogcm echo $mini32nogcm - echo $full64nogcm - echo $full32nogcm +# echo $full64nogcm +# echo $full32nogcm - 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\": \"${{ github.event.head_commit.message }}\",\"parse_mode\": \"Markdown\"}]" --verbose >/dev/null + 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=@"${mini64nogcm}" --form apk4=@"${mini32nogcm}" --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\": \"${{ github.event.head_commit.message }}\",\"parse_mode\": \"Markdown\"}]" --verbose >/dev/null pkill telegram-bot telegram-bot-api: