Skip to content

[Build]: Configure JNI build for use in Java on Linux/MacOS #5

[Build]: Configure JNI build for use in Java on Linux/MacOS

[Build]: Configure JNI build for use in Java on Linux/MacOS #5

Workflow file for this run

name: JNI MacOS
on:
push:
branches: [ dev, master ]
pull_request:
branches: [ dev, master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: [ self-hosted, macOS, ARM64, wallet-core ]
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: Install system dependencies
run: |
tools/install-sys-dependencies-mac
tools/install-rust-dependencies
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- 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: Code generation
run: |
tools/generate-files native
- 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
run: |
ninja -Cbuild