Skip to content

ci: fix path issue

ci: fix path issue #25

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
PROTOC_VERSION: 3.23.4
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: actions/[email protected]
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Android SDK
uses: amyu/setup-android@v3
with:
sdk-version: 34
build-tools-version: 34.0.0
cmake-version: 3.10.2.4988404
ndk-version: 26.1.10909125
- name: Setup protoc
uses: taiki-e/install-action@v2
with:
tool: protoc@${{ env.PROTOC_VERSION }}
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Setup targets
run: make prepare-android
- name: Run tests
run: cargo test --verbose --features ci
- name: Build Android Cargo
working-directory: examples/android
run: ./gradlew cargoBuild
env:
ANDROID_NDK_HOME: ${{ env.ANDROID_SDK_ROOT }}/ndk/26.1.10909125
TOOLCHAIN: ${{ env.ANDROID_SDK_ROOT }}/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64
RANLIB: ${{ env.ANDROID_SDK_ROOT }}/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ranlib
- name: Generate Binding for Kotlin
run: make bindgen-kotlin
- name: Build Android APK
working-directory: examples/android
run: ./gradlew assembleDebug