mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
78aada7027
Core is supposed to support all Rust versions above MSRV, there is no need to use the same toolchain for the core across all platforms.
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
name: Upload Preview APK
|
|
|
|
on: pull_request
|
|
|
|
jobs:
|
|
build:
|
|
name: Upload Preview APK
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.9.1
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- uses: Swatinem/rust-cache@v1
|
|
with:
|
|
working-directory: jni/deltachat-core-rust
|
|
- uses: actions/setup-java@v1.4.3
|
|
with:
|
|
java-version: 11
|
|
- uses: android-actions/setup-android@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
- uses: nttld/setup-ndk@v1
|
|
id: setup-ndk
|
|
with:
|
|
ndk-version: r23c
|
|
|
|
- name: Compile core
|
|
env:
|
|
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
run: |
|
|
export PATH="${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/"
|
|
scripts/install-toolchains.sh && scripts/ndk-make.sh
|
|
|
|
- name: Validate Gradle Wrapper
|
|
uses: gradle/wrapper-validation-action@v1
|
|
|
|
- name: Build APK
|
|
run: ./gradlew --no-daemon assembleGplayDebug
|
|
|
|
- name: Upload APK
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: app-preview.apk
|
|
path: 'build/outputs/apk/gplay/debug/*.apk'
|