@@ -2,9 +2,93 @@ name: Build MultiGram
4 workflow_dispatch:
4 workflow_dispatch:
7+ description: Branch, tag or commit to build
11+ description: Also build a full release APK (slow, compiles the native code)
7− placeholder:
27+ compile:
28+ name: Compile Java and Kotlin
29+ runs-on: ubuntu-latest
32+ - uses: actions/checkout@v4
34+ ref: ${{ inputs.ref }}
35+ - name: Fetch the submodules the Java build needs
36+ run: git submodule update --init --depth 1 TMessagesProj/lib/jlatexmath TMessagesProj_Modules/media
37+ - uses: actions/setup-java@v4
39+ distribution: temurin
41+ - uses: gradle/actions/setup-gradle@v4
44+ echo "org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=1g" >> gradle.properties
45+ ./gradlew --no-daemon --stacktrace \
46+ :TMessagesProj:compileReleaseJavaWithJavac \
47+ :TMessagesProj_App:compileAfatReleaseJavaWithJavac
48+ - name: Run MultiGram tool checks
49+ if: hashFiles('multigram/tools/check.sh') != ''
50+ run: bash multigram/tools/check.sh
54+ if: ${{ inputs.apk }}
8 runs-on: ubuntu-latest
56 runs-on: ubuntu-latest
10− - run: echo "The build job is added in the next commit."
59+ - uses: actions/checkout@v4
61+ ref: ${{ inputs.ref }}
63+ - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
67+ - uses: actions/setup-java@v4
69+ distribution: temurin
71+ - uses: nttld/setup-ndk@v1.4.2
75+ - name: Install NDK for the JNI build
76+ run: yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;27.2.12479018"
79+ APP_ID: ${{ secrets.MULTIGRAM_APP_ID }}
80+ APP_HASH: ${{ secrets.MULTIGRAM_APP_HASH }}
82+ vars=gradle.properties
83+ echo "org.gradle.workers.max=1" >> $vars
84+ [ -n "$APP_ID" ] && echo "APP_ID=$APP_ID" >> $vars
85+ [ -n "$APP_HASH" ] && echo "APP_HASH=$APP_HASH" >> $vars
86+ echo "RELEASE_KEYSTORE_FILE=$PWD/TMessagesProj/config/release.keystore" >> $vars
88+ sudo apt -y install ninja-build meson nasm gperf pkg-config unzip
89+ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
90+ ./gradlew :TMessagesProj_App:assembleAfatRelease
91+ - uses: actions/upload-artifact@v4
94+ path: TMessagesProj_App/build/outputs/apk/afat/release/*.apk