name: Dev Branch Build on: push: paths-ignore: - '**.md' - '.github/**' - '!.github/workflows/**' branches: - dev jobs: canaryBuild: name: Canary Build runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[s]')" steps: - uses: actions/checkout@v2 - uses: actions/cache@v1 with: path: ~/.gradle key: gradle-${{ hashFiles('**/*.gradle') }} - uses: actions/setup-java@v1 with: java-version: 1.8 - name: Run Gradle Build run: | export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" ./gradlew assembleFullRelease echo ::set-env name=APK_FILE::$(find TMessagesProj/build/outputs/apk -name "*arm64-v8a*.apk") echo ::set-env name=APK_FILE_ARMV7::$(find TMessagesProj/build/outputs/apk -name "*armeabi*.apk") echo ::set-env name=APK_FILE_X86::$(find TMessagesProj/build/outputs/apk -name "*x86-*.apk") echo ::set-env name=APK_FILE_X64::$(find TMessagesProj/build/outputs/apk -name "*x86_64*.apk") - name: Upload Canary Apk uses: appleboy/telegram-action@master with: to: ${{ secrets.CANARY_CHANNEL }} token: ${{ secrets.TELEGRAM_TOKEN }} document: ${{ env.APK_FILE }} - name: Upload Canary Apk ( armv7 ) uses: appleboy/telegram-action@master with: to: ${{ secrets.CANARY_CHANNEL }} token: ${{ secrets.TELEGRAM_TOKEN }} document: ${{ env.APK_FILE_ARMV7 }} nativeBuild: name: Native Build runs-on: ubuntu-latest if: "contains(github.event.head_commit.message, '[n]')" steps: - uses: actions/checkout@v2 - uses: actions/cache@v1 with: path: ~/.gradle key: native-${{ hashFiles('**/*.gradle') }} restore-keys: | ${{ runner.os }}-gradle- - run: git submodule update --init --recursive - uses: actions/cache@v1 with: path: TMessagesProj/jni/boringssl/build key: boringssl-${{ hashFiles('TMessagesProj/jni/boringssl/.git') }} - uses: actions/cache@v1 with: path: TMessagesProj/jni/ffmpeg/build key: ffmpeg-${{ hashFiles('TMessagesProj/jni/ffmpeg/.git') }} - uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build native libraries run: | cd TMessagesProj/jni while : do sudo apt-get install -y ninja-build && break sleep 5 done export NDK=$ANDROID_HOME/ndk-bundle export NINJA_PATH=/usr/bin/ninja export PATH=`echo $ANDROID_HOME/cmake/*/bin`:$PATH [ -d "ffmpeg/build" ] || ./build_ffmpeg_clang.sh ./patch_ffmpeg.sh ./patch_boringssl.sh [ -d "boringssl/build" ] || ./build_boringssl.sh - name: assemble run: | sudo bash <