mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
name: Core Cache
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'jni/deltachat-core-rust'
|
|
- 'jni/Android.mk'
|
|
- 'jni/Application.mk'
|
|
- 'jni/dc_wrapper.c'
|
|
- 'scripts/ndk-make.sh'
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
persist-credentials: false
|
|
|
|
- uses: android-actions/setup-android@40fd30fb8d7440372e1316f5d1809ec01dcd3699 # v4.0.1
|
|
- uses: nttld/setup-ndk@ed92fe6cadad69be94a966a7ee3271275e62f779 # v1.6.0
|
|
id: setup-ndk
|
|
with:
|
|
ndk-version: r27
|
|
|
|
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
|
|
with:
|
|
workspaces: jni/deltachat-core-rust
|
|
|
|
- name: Get deltachat-core-rust submodule hash
|
|
id: core-hash
|
|
run: echo "hash=$(git rev-parse HEAD:jni/deltachat-core-rust)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache compiled core
|
|
id: cache-core
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
jni/arm64-v8a
|
|
libs/arm64-v8a
|
|
key: core-arm64-v8a-${{ steps.core-hash.outputs.hash }}-${{ hashFiles('jni/Android.mk', 'jni/Application.mk', 'jni/dc_wrapper.c', 'scripts/ndk-make.sh') }}-ndk-r27
|
|
|
|
- name: Compile core
|
|
if: steps.cache-core.outputs.cache-hit != 'true'
|
|
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 arm64-v8a
|