Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #15 from zoedberg/CI_build
Browse files Browse the repository at this point in the history
CI build
  • Loading branch information
dr-orlovsky authored Nov 6, 2020
2 parents cd71cac + 48c9f3d commit 503291a
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/bindings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Bindings

on:
push:
branches: [ master ]
paths-ignore:
- '**.md'
- 'demo/**'
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always

jobs:
android:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
toolchain: [ 1.47.0 ]
steps:
- uses: actions/checkout@v2
- name: Install Rust ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- name: Install Linux dependencies
run: |
sudo apt-get install -y libpcre3-dev libssl-dev libzmq3-dev
wget https://freefr.dl.sourceforge.net/project/swig/swig/swig-4.0.1/swig-4.0.1.tar.gz
tar xf swig-4.0.1.tar.gz
cd swig-4.0.1 && ./configure && make -j4 && sudo make install
- name: Build bindings
env:
NDK_VERSION: 20.1.5948944
run: |
export ANDROID_SDK_ROOT="$GITHUB_WORKSPACE/sdk"
export NDK_HOME="$ANDROID_SDK_ROOT/ndk/$NDK_VERSION"
# this variable should be deprecated but gradlew fails to find the correct ndk without it
export ANDROID_NDK_HOME="$NDK_HOME"
wget https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
unzip commandlinetools-linux-6609375_latest.zip
mkdir $ANDROID_SDK_ROOT && mv tools $ANDROID_SDK_ROOT/
yes 2>/dev/null | $ANDROID_SDK_ROOT/tools/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT \
"platform-tools" "build-tools;29.0.3" "platforms;android-29" "ndk;$NDK_VERSION" "cmake;3.10.2.4988404"; true
rustup target add aarch64-linux-android x86_64-linux-android armv7-linux-androideabi i686-linux-android
cd $GITHUB_WORKSPACE/ffi/android
./gradlew build
ios:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest ]
toolchain: [ 1.47.0 ]
steps:
- uses: actions/checkout@v2
- name: Install Rust ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- name: Install macOS dependencies
run: |
brew install cmake openssl zmq
rustup target add aarch64-apple-ios x86_64-apple-ios
cargo install cargo-lipo
- name: Build bindings
uses: actions-rs/cargo@v1
with:
command: lipo
args: --manifest-path rust-lib/Cargo.toml --release
node:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
toolchain: [ 1.47.0 ]
node-version: [ 10.x ]
steps:
- uses: actions/checkout@v2
- name: Install Rust ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- name: Install Linux dependencies
run: |
sudo apt-get install -y libpcre3-dev libssl-dev libzmq3-dev
wget https://freefr.dl.sourceforge.net/project/swig/swig/swig-4.0.1/swig-4.0.1.tar.gz
tar xf swig-4.0.1.tar.gz
cd swig-4.0.1 && ./configure && make -j4 && sudo make install
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build bindings
run: |
sudo apt-get install -y node-gyp
cd $GITHUB_WORKSPACE/ffi/nodejs
npm install
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# RGB SDK

![Bindings](https://github.com/LNP-BP/rgb-sdk/workflows/Bindings/badge.svg)
![Lints](https://github.com/LNP-BP/rgb-sdk/workflows/Lints/badge.svg)

This repository contains FFI bindings and SDK for wallet & server-side development,
Expand Down

0 comments on commit 503291a

Please sign in to comment.