mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-06 07:34:24 +01:00
82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
name: Build bindings for Windows
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
description: 'commit/tag/branch reference'
|
|
required: true
|
|
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:
|
|
matrix:
|
|
target: [
|
|
x86_64-pc-windows-msvc,
|
|
i686-pc-windows-msvc,
|
|
]
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ inputs.ref }}
|
|
repository: ${{ inputs.repository || github.repository }}
|
|
|
|
- name: Install rust toolchain
|
|
run: |
|
|
rustup set auto-self-update disable
|
|
rustup toolchain install stable --profile minimal
|
|
rustup target add ${{ matrix.target }}
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: lib
|
|
|
|
- name: Build bindings
|
|
working-directory: lib/bindings
|
|
run: cargo build --release --target ${{ matrix.target }}
|
|
|
|
- name: Archive release
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: bindings-${{ matrix.target }}
|
|
path: lib/target/${{ matrix.target }}/release/breez_liquid_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_liquid_sdk_bindings.dll
|
|
|
|
- name: Upload dummy windows ${{ matrix.target }} artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: bindings-${{ matrix.target }}
|
|
path: ./* |