Skip to content

Return invoice on successful lnurl-withdraw #1654

Return invoice on successful lnurl-withdraw

Return invoice on successful lnurl-withdraw #1654

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the "main" branch
push:
branches: [ main ]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Format
run: |
cd libs
cargo fmt -- --check
cd ../tools/sdk-cli
cargo fmt -- --check
build-core:
name: Test sdk-core
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
workspaces: libs/sdk-core -> ../target
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "23.4"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run sdk-core tests
working-directory: libs/sdk-core
run: cargo test
build-bindings:
name: Test sdk-bindings
runs-on: macOS-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
workspaces: libs/sdk-bindings -> ../target
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "23.4"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build sdk-bindings
working-directory: libs/sdk-bindings
run: cargo build
- name: Build C# bindings
working-directory: libs/sdk-bindings
run: |
cargo install uniffi-bindgen-cs --git https://github.com/breez/uniffi-bindgen-cs --branch namespace
uniffi-bindgen-cs src/breez_sdk.udl -o ffi/csharp -c ./uniffi.toml
cp ../target/debug/libbreez_sdk_bindings.dylib ffi/csharp
- name: Build golang bindings
working-directory: libs/sdk-bindings
run: |
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go
uniffi-bindgen-go src/breez_sdk.udl -o ffi/golang -c ./uniffi.toml
cp ../target/debug/libbreez_sdk_bindings.dylib ffi/golang
cp -r ffi/golang/breez/breez_sdk tests/bindings/golang/
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '1.19.9'
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Run sdk-bindings tests
run: |
curl -o jna-5.12.1.jar https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar
export CLASSPATH=$(pwd)/jna-5.12.1.jar;
cd libs/sdk-bindings
cargo test
build-cli:
name: Test sdk-cli
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
workspaces: tools/sdk-cli -> target
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "23.4"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run tools tests
working-directory: tools/sdk-cli
run: cargo test
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
libs -> target
tools/sdk-cli -> target
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "23.4"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: clippy
run: |
cd libs
# Explicitly allow clippy::uninlined-format-args lint because it's present in the generated breez_sdk.uniffi.rs
cargo clippy -- -D warnings -A clippy::uninlined-format-args
cargo clippy --tests -- -D warnings -A clippy::uninlined-format-args
cd ../tools/sdk-cli
cargo clippy -- -D warnings