Skip to content

Commit

Permalink
Merge branch 'ci-callable-from-remote-repo'
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Nov 5, 2023
2 parents 8b2342d + 47150c3 commit 1b559da
Show file tree
Hide file tree
Showing 12 changed files with 306 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/build-bindings-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ on:
type: string
workflow_call:
inputs:
repository:
description: 'sdk repository, defaults to current repository'
required: false
type: string
ref:
description: 'commit/tag/branch reference'
required: true
type: string
use-dummy-binaries:
description: 'If true, creates dummy binaries rather than real binaries'
required: false
type: boolean
default: false

jobs:
build:
if: ${{ !inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build ${{ matrix.target }}
strategy:
Expand All @@ -30,6 +40,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository || github.repository }}

- name: Install rust toolchain
run: |
Expand Down Expand Up @@ -102,3 +113,58 @@ jobs:
with:
name: sdk-bindings-android-jniLibs
path: ./*

build-dummies:
if: ${{ inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build android dummies
strategy:
matrix:
target: [
aarch64-linux-android,
armv7-linux-androideabi,
i686-linux-android,
x86_64-linux-android,
]
steps:
- name: Build Android ${{ matrix.target }} dummy
run: |
touch libbreez_sdk_bindings.so
touch libc++_shared.so.so
- name: Upload dummy Android ${{ matrix.target }} artifact
uses: actions/upload-artifact@v3
with:
name: sdk-bindings-${{ matrix.target }}
path: ./*

jnilibs-dummy:
needs: build-dummies
runs-on: ubuntu-latest
name: build jniLibs dummy
steps:
- uses: actions/download-artifact@v3
with:
name: sdk-bindings-aarch64-linux-android
path: arm64-v8a

- uses: actions/download-artifact@v3
with:
name: sdk-bindings-armv7-linux-androideabi
path: armeabi-v7a

- uses: actions/download-artifact@v3
with:
name: sdk-bindings-i686-linux-android
path: x86

- uses: actions/download-artifact@v3
with:
name: sdk-bindings-x86_64-linux-android
path: x86_64

- name: Archive jniLibs
uses: actions/upload-artifact@v3
with:
name: sdk-bindings-android-jniLibs
path: ./*
34 changes: 34 additions & 0 deletions .github/workflows/build-bindings-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ on:
type: string
workflow_call:
inputs:
repository:
description: 'sdk repository, defaults to current repository'
required: false
type: string
ref:
description: 'commit/tag/branch reference'
required: true
type: string
use-dummy-binaries:
description: 'If true, creates dummy binaries rather than real binaries'
required: false
type: boolean
default: false

jobs:
build:
if: ${{ !inputs.use-dummy-binaries }}
runs-on: macOS-latest
name: build ${{ matrix.target }}
strategy:
Expand All @@ -28,6 +38,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository || github.repository }}

- name: Install rust toolchain
run: |
Expand Down Expand Up @@ -86,3 +97,26 @@ jobs:
path: |
darwin-universal/libbreez_sdk_bindings.dylib
darwin-universal/libbreez_sdk_bindings.a
build-dummies:
if: ${{ inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build darwin dummies
strategy:
matrix:
target: [
aarch64-apple-darwin,
x86_64-apple-darwin,
darwin-universal
]
steps:
- name: Build dummy darwin ${{ matrix.target }}
run: |
touch libbreez_sdk_bindings.dylib
touch libbreez_sdk_bindings.a
- name: Upload dummy darwin ${{ matrix.target }} artifact
uses: actions/upload-artifact@v3
with:
name: sdk-bindings-${{ matrix.target }}
path: ./*
33 changes: 33 additions & 0 deletions .github/workflows/build-bindings-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ on:
type: string
workflow_call:
inputs:
repository:
description: 'sdk repository, defaults to current repository'
required: false
type: string
ref:
description: 'commit/tag/branch reference'
required: true
type: string
use-dummy-binaries:
description: 'If true, creates dummy binaries rather than real binaries'
required: false
type: boolean
default: false

jobs:
build:
if: ${{ !inputs.use-dummy-binaries }}
runs-on: macOS-latest
name: build ${{ matrix.target }}
strategy:
Expand All @@ -29,6 +39,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository || github.repository }}

- name: Install rust toolchain
run: |
Expand Down Expand Up @@ -60,3 +71,25 @@ jobs:
with:
name: sdk-bindings-${{ matrix.target }}
path: libs/target/${{ matrix.target }}/release/libbreez_sdk_bindings.a

build-dummies:
if: ${{ inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build ios dummies
strategy:
matrix:
target: [
aarch64-apple-ios,
x86_64-apple-ios,
aarch64-apple-ios-sim,
]
steps:
- name: Build dummy ios ${{ matrix.target }}
run: |
touch libbreez_sdk_bindings.a
- name: Upload dummy ios ${{ matrix.target }} artifact
uses: actions/upload-artifact@v3
with:
name: sdk-bindings-${{ matrix.target }}
path: ./*
32 changes: 32 additions & 0 deletions .github/workflows/build-bindings-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ on:
type: string
workflow_call:
inputs:
repository:
description: 'sdk repository, defaults to current repository'
required: false
type: string
ref:
description: 'commit/tag/branch reference'
required: true
type: string
use-dummy-binaries:
description: 'If true, creates dummy binaries rather than real binaries'
required: false
type: boolean
default: false

jobs:
build:
if: ${{ !inputs.use-dummy-binaries }}
runs-on: ubuntu-20.04
name: build ${{ matrix.target }}
strategy:
Expand All @@ -28,6 +38,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository || github.repository }}

- name: Install rust toolchain
run: |
Expand Down Expand Up @@ -69,3 +80,24 @@ jobs:
with:
name: sdk-bindings-${{ matrix.target }}
path: libs/target/${{ matrix.target }}/release/libbreez_sdk_bindings.so

build-dummies:
if: ${{ inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build linux dummies
strategy:
matrix:
target: [
aarch64-unknown-linux-gnu,
x86_64-unknown-linux-gnu,
]
steps:
- name: Build dummy linux ${{ matrix.target }}
run: |
touch libbreez_sdk_bindings.so
- name: Upload dummy linux ${{ matrix.target }} artifact
uses: actions/upload-artifact@v3
with:
name: sdk-bindings-${{ matrix.target }}
path: ./*
32 changes: 32 additions & 0 deletions .github/workflows/build-bindings-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ on:
type: string
workflow_call:
inputs:
repository:
description: 'sdk repository, defaults to current repository'
required: false
type: string
ref:
description: 'commit/tag/branch reference'
required: true
type: string
use-dummy-binaries:
description: 'If true, creates dummy binaries rather than real binaries'
required: false
type: boolean
default: false

jobs:
build:
if: ${{ !inputs.use-dummy-binaries }}
runs-on: windows-latest
name: build ${{ matrix.target }}
strategy:
Expand All @@ -28,6 +38,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository || github.repository }}

- name: Install rust toolchain
run: |
Expand All @@ -54,3 +65,24 @@ jobs:
with:
name: sdk-bindings-${{ matrix.target }}
path: libs/target/${{ matrix.target }}/release/breez_sdk_bindings.dll

build-dummies:
if: ${{ inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build windows dummies
strategy:
matrix:
target: [
x86_64-pc-windows-msvc,
i686-pc-windows-msvc,
]
steps:
- name: Build dummy windows ${{ matrix.target }}
run: |
touch breez_sdk_bindings.dll
- name: Upload dummy windows ${{ matrix.target }} artifact
uses: actions/upload-artifact@v3
with:
name: sdk-bindings-${{ matrix.target }}
path: ./*
5 changes: 5 additions & 0 deletions .github/workflows/build-language-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
default: false
workflow_call:
inputs:
repository:
description: 'sdk repository, defaults to current repository'
required: false
type: string
ref:
description: 'commit/tag/branch reference'
required: true
Expand Down Expand Up @@ -60,6 +64,7 @@ jobs:
- name: Checkout breez-sdk repo
uses: actions/checkout@v3
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}

- name: Install rust
Expand Down
Loading

0 comments on commit 1b559da

Please sign in to comment.