mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-25 08:54:21 +01:00
* install protoc on workflow (cherry picked from commit 317c7906d968eeb6726ab4a9076a8bf64bdf4a6e) * Bump setup-protoc to v3 and 27.2 --------- Co-authored-by: Roei Erez <roeierez@gmail.com>
88 lines
2.3 KiB
YAML
88 lines
2.3 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 }}
|
|
|
|
- name: Install Protoc
|
|
uses: arduino/setup-protoc@v3
|
|
with:
|
|
version: "27.2"
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- 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: ./* |