Skip to content

Commit

Permalink
Updated Workflow to be more modern
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinosh committed Aug 16, 2024
1 parent 0b2bb8d commit cab0878
Show file tree
Hide file tree
Showing 16 changed files with 642 additions and 304 deletions.
57 changes: 9 additions & 48 deletions .github/workflows/build-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,69 +8,30 @@ on: push
jobs:
build-library:
name: Build Core Library and Kotlin Bindings
strategy:
matrix:
platform:
# - release_for: Android-aarch64
# os: ubuntu-20.04
# target: aarch64-linux-android
# bin: ark-core
# name: ark-core-Android-aarch64.zip
# command: build
# - release_for: Android-armv7
# os: ubuntu-20.04
# target: armv7-linux-androideabi
# bin: ark-core
# name: ark-core-Android-armv7.zip
# command: build
# - release_for: Android-i686
# os: ubuntu-20.04
# target: i686-linux-android
# bin: ark-core
# name: ark-core-Android-i686.zip
# command: build
- release_for: Android-ax86_64
os: ubuntu-22.04
target: x86_64-linux-android
bin: ark-core
name: ark-core-Android-ax86_64.zip
outputDir: ./target/x86_64-linux-android/debug
command: build

runs-on: ${{ matrix.platform.os }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: install dependencies (ubuntu only)
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Rust cache
uses: swatinem/rust-cache@v2
- name: install cargo ndk
run: cargo install cargo-ndk
- name: Add Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.platform.target }}

- name: Install Cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build Core Library
run: cross ${{ matrix.platform.command }} -p drop_core --target ${{ matrix.platform.target }}
targets: aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
- name: Build Library
run: cargo ndk -o ./target/release/jniLibs --target aarch64-linux-android --target armv7-linux-androideabi --target i686-linux-android --target x86_64-linux-android --release
- name: Generate Bindings
run: cargo run -p uniffi-bingen generate --library ${{ matrix.platform.outputDir }}/libdrop_core.so --language=kotlin --out-dir ./bindings

run: cargo run -p uniffi-bingen generate --library ${{ matrix.platform.outputDir }}/libdrop_core.so --language=kotlin --out-dir ./target/release/bindings
- name: Upload Library
uses: actions/upload-artifact@v4
with:
name: ark-drop-core
path: ${{ matrix.platform.outputDir }}/libdrop_core.so

path: ./target/release/jniLibs
- name: Upload Bindings
uses: actions/upload-artifact@v4
with:
name: ark-drop-bindings
path: ./bindings
path: ./target/release/bindings
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ name: Build
env:
CARGO_TERM_COLOR: always

on: push
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-tauri:
Expand Down
Loading

0 comments on commit cab0878

Please sign in to comment.