Skip to content

Commit

Permalink
Target breez_sdk@flutter_rust_bridge_v2 by default
Browse files Browse the repository at this point in the history
* Upgrade to checkout@v4
* Upgrade to setup-java@v2
* Changer runner to macOS-latest
* Fix linter warning
* Allow setting Liquid & Breez SDK ref on manually triggered workflows
  • Loading branch information
erdemyerebasmaz committed Jun 4, 2024
1 parent 05d1aca commit acecf9b
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 38 deletions.
64 changes: 33 additions & 31 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,64 @@ on:
branches: [ "main" ]
workflow_dispatch:
inputs:
ref:
description: 'SDK commit/tag/branch reference'
liquid_sdk_ref:
description: 'Liquid SDK commit/tag/branch reference'
required: false
type: string
default: 'main'
breez_sdk_ref:
description: 'Breez SDK commit/tag/branch reference'
required: false
type: string
default: 'flutter_rust_bridge_v2'

jobs:
build:
runs-on: macOS-13
runs-on: macOS-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: 🏗️ Setup l-breez repository
uses: actions/checkout@v4
with:
path: 'lbreez'

- uses: actions/checkout@v3
# TODO: Liquid - Revert once breez-sdk dependency is removed
- name: 🏗️ Setup breez-sdk repository
uses: actions/checkout@v4
with:
repository: 'breez/breez-sdk'
ssh-key: ${{secrets.REPO_SSH_KEY}}
path: 'breez-sdk'
ref: ${{ inputs.ref }}
ref: ${{ inputs.breez_sdk_ref }}

- uses: actions/checkout@v3
- name: 🏗️ Setup breez-liquid-sdk repository
uses: actions/checkout@v4
with:
repository: 'breez/breez-liquid-sdk'
ssh-key: ${{secrets.REPO_SSH_KEY}}
path: 'breez-liquid-sdk'
ref: ${{ inputs.ref }}
ref: ${{ inputs.liquid_sdk_ref }}

# Setup the flutter environment.
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true

- uses: actions/setup-java@v2
- name: 🏗️ Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'

- name: pub-get
run: |
cd lbreez
flutter pub get
- name: 🏗️ Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true

- name: dart-analyze
run: |
cd lbreez
dart analyze --fatal-infos
- name: 📦 Install Flutter dependencies
working-directory: lbreez
run: flutter pub get

- name: run-tests
run: |
cd lbreez
flutter test
- name: 🔍 Perform static analysis
working-directory: lbreez
run: dart analyze --fatal-infos

- name: dart-format
run: |
cd lbreez
dart format -o none --set-exit-if-changed -l 110 .
- name: Check Formatting
working-directory: lbreez
run: dart format -o none --set-exit-if-changed -l 110 .
20 changes: 17 additions & 3 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ name: Build Android
on:
workflow_dispatch:
inputs:
ref:
description: 'SDK commit/tag/branch reference'
liquid_sdk_ref:
description: 'Liquid SDK commit/tag/branch reference'
required: false
type: string
default: 'main'
breez_sdk_ref:
description: 'Breez SDK commit/tag/branch reference'
required: false
type: string
default: 'flutter_rust_bridge_v2'

jobs:
build-android:
Expand Down Expand Up @@ -68,13 +73,22 @@ jobs:
GOOGLE_SERVICES: ${{secrets.GOOGLE_SERVICES}}
run: echo "$GOOGLE_SERVICES" > android/app/google-services.json

# TODO: Liquid - Revert once breez-sdk dependency is removed
- name: 🏗️ Setup breez-sdk repository
uses: actions/checkout@v4
with:
repository: 'breez/breez-sdk'
ssh-key: ${{secrets.REPO_SSH_KEY}}
path: 'breez-sdk'
ref: ${{ inputs.breez_sdk_ref }}

- name: 🏗️ Setup breez-liquid-sdk repository
uses: actions/checkout@v4
with:
repository: 'breez/breez-liquid-sdk'
ssh-key: ${{secrets.REPO_SSH_KEY}}
path: 'breez-liquid-sdk'
ref: ${{ inputs.ref }}
ref: ${{ inputs.liquid_sdk_ref }}

- name: 🏗️ Rust cache
uses: Swatinem/rust-cache@v2
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@ name: Build iOS
on:
workflow_dispatch:
inputs:
ref:
description: 'SDK commit/tag/branch reference'
liquid_sdk_ref:
description: 'Liquid SDK commit/tag/branch reference'
required: false
type: string
default: 'main'
breez_sdk_ref:
description: 'Breez SDK commit/tag/branch reference'
required: false
type: string
default: 'flutter_rust_bridge_v2'

jobs:
build-ios:
name: Build iOS
runs-on: macOS-13
runs-on: macOS-latest
env:
SCHEME: Runner
BUILD_CONFIGURATION: Release
Expand Down Expand Up @@ -74,13 +79,22 @@ jobs:
working-directory: lbreez
run: echo "$GOOGLE_SERVICES_IOS" > ios/Runner/GoogleService-Info.plist

# TODO: Liquid - Revert once breez-sdk dependency is removed
- name: 🏗️ Setup breez-sdk repository
uses: actions/checkout@v4
with:
repository: 'breez/breez-sdk'
ssh-key: ${{secrets.REPO_SSH_KEY}}
path: 'breez-sdk'
ref: ${{ inputs.breez_sdk_ref }}

- name: 🏗️ Setup breez-liquid-sdk repository
uses: actions/checkout@v4
with:
repository: 'breez/breez-liquid-sdk'
ssh-key: ${{secrets.REPO_SSH_KEY}}
path: 'breez-liquid-sdk'
ref: ${{ inputs.ref }}
ref: ${{ inputs.liquid_sdk_ref }}

- name: 🏗️ Rust cache
uses: Swatinem/rust-cache@v2
Expand Down
1 change: 1 addition & 0 deletions lib/routes/create_invoice/create_invoice_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ class CreateInvoicePageState extends State<CreateInvoicePage> {
},
);

// ignore: use_build_context_synchronously
return showDialog(
useRootNavigator: false,
context: context,
Expand Down

0 comments on commit acecf9b

Please sign in to comment.