diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b8f4935f..1ea452ac 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 . \ No newline at end of file + - name: Check Formatting + working-directory: lbreez + run: dart format -o none --set-exit-if-changed -l 110 . \ No newline at end of file diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 4ba6c895..3e9bee3c 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -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: @@ -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 diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index fc24b642..0afab91e 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -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 @@ -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 diff --git a/lib/routes/create_invoice/create_invoice_page.dart b/lib/routes/create_invoice/create_invoice_page.dart index 0341a765..8c6d5c8c 100644 --- a/lib/routes/create_invoice/create_invoice_page.dart +++ b/lib/routes/create_invoice/create_invoice_page.dart @@ -139,6 +139,7 @@ class CreateInvoicePageState extends State { }, ); + // ignore: use_build_context_synchronously return showDialog( useRootNavigator: false, context: context,