Skip to content

[Rust/Greenfield]: Move BNB Greenfield to Rust #1722

[Rust/Greenfield]: Move BNB Greenfield to Rust

[Rust/Greenfield]: Move BNB Greenfield to Rust #1722

Workflow file for this run

name: Kotlin CI
on:
push:
branches: [ dev, master ]
pull_request:
branches: [ dev, master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: macos-latest-xlarge
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.1.1
- name: Install system dependencies
run: |
tools/install-sys-dependencies-mac
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: |
rust
- name: Install Rust dependencies
run: |
tools/install-rust-dependencies
- name: Install emsdk
run: tools/install-wasm-dependencies
- name: Install Kotlin Dependencies
run: tools/install-kotlin-dependencies
- name: Cache internal dependencies
id: internal_cache
uses: actions/cache@v3
with:
path: build/local
key: ${{ runner.os }}-internal-${{ hashFiles('tools/install-dependencies') }}
- name: Install internal dependencies
run: tools/install-dependencies
if: steps.internal_cache.outputs.cache-hit != 'true'
- name: Generate files
run: |
source emsdk/emsdk_env.sh
tools/generate-files
- name: CMake (Java, Kotlin)
run: |
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DTW_UNITY_BUILD=ON -DTW_COMPILE_JAVA=ON -DTW_COMPILE_KOTLIN=ON -GNinja
- name: Build JNI
run: |
ninja -Cbuild
mv build/libTrustWalletCore.dylib kotlin/wallet-core-kotlin/src/jvmMain/resources/jni/macos-arm64/
- name: Build Kotlin Multiplatform
run: tools/kotlin-build
- name: Run Kotlin Multiplatform tests
run: tools/kotlin-test