Skip to content

Commit

Permalink
[build]: Add JNI MacOS workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshiotomakan committed Sep 4, 2023
1 parent 0152d5f commit 09a5cac
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux CI JNI
name: JNI Linux

on:
push:
Expand All @@ -20,12 +20,14 @@ jobs:
run: |
tools/install-sys-dependencies-linux
tools/install-rust-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
Expand All @@ -46,13 +48,15 @@ jobs:
env:
CC: /usr/bin/clang
CXX: /usr/bin/clang++

- 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
env:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
- name: Build and test

- name: Build
run: |
ninja -Cbuild
env:
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/jni-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
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: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: |
rust
- 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

0 comments on commit 09a5cac

Please sign in to comment.