From 6dd658ec8790904d61973702b304b6c13008ef2e Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Wed, 10 Sep 2025 10:40:13 +0100 Subject: [PATCH 1/5] fix(ios): Simplify SPM usage for native library --- packages/capacitor-plugin/Package.swift | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/capacitor-plugin/Package.swift b/packages/capacitor-plugin/Package.swift index c220592..445a483 100644 --- a/packages/capacitor-plugin/Package.swift +++ b/packages/capacitor-plugin/Package.swift @@ -10,20 +10,16 @@ let package = Package( targets: ["FilesystemPlugin"]) ], dependencies: [ - .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0") + .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0"), + .package(url: "https://github.com/ionic-team/ion-ios-filesystem.git", from: "1.0.1") ], targets: [ - .binaryTarget( - name: "IONFilesystemLib", - url: "https://github.com/ionic-team/ion-ios-filesystem/releases/download/1.0.1/IONFilesystemLib.zip", - checksum: "2d333c2be44a51f804f3b592d61fa19d582afc40b6916c1c9d1dee43c30657b9" // sha-256 - ), .target( name: "FilesystemPlugin", dependencies: [ .product(name: "Capacitor", package: "capacitor-swift-pm"), .product(name: "Cordova", package: "capacitor-swift-pm"), - "IONFilesystemLib" + .product(name: "IONFilesystemLib", package: "ion-ios-filesystem") ], path: "ios/Sources/FilesystemPlugin"), .testTarget( From 3f43f34078cbcde6657f6f400cc8269b66d081fb Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Wed, 10 Sep 2025 11:02:10 +0100 Subject: [PATCH 2/5] chore(ci): Speed up by separating android/ios --- .../actions/prepare-example-app/action.yml | 18 ++++++++ .github/workflows/continuous_integration.yml | 45 ++++++++++++------- 2 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 .github/actions/prepare-example-app/action.yml diff --git a/.github/actions/prepare-example-app/action.yml b/.github/actions/prepare-example-app/action.yml new file mode 100644 index 0000000..9823e39 --- /dev/null +++ b/.github/actions/prepare-example-app/action.yml @@ -0,0 +1,18 @@ +name: 'Prepare Example app' +description: 'Does necessary pre-work for the example app to compile natively' + +runs: + using: 'composite' + steps: + - name: 'Build plugin' + working-directory: ./packages/capacitor-plugin + run: npm run build + - name: 'Install example app dependencies' + working-directory: ./packages/example-app-capacitor + run: npm i + - name: 'Build Web example app' + working-directory: ./packages/example-app-capacitor + run: npm run build + - name: 'Sync example app native platforms' + working-directory: ./packages/example-app-capacitor + run: npx cap sync \ No newline at end of file diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index c9ae78e..f7aca7c 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -16,7 +16,7 @@ jobs: needs: 'setup' uses: ./.github/workflows/reusable_build.yml - verify-plugin: + verify-plugin-android: needs: ['setup', 'lint', 'build'] runs-on: 'macos-15' timeout-minutes: 30 @@ -24,33 +24,46 @@ jobs: - uses: actions/checkout@v4 - name: 'Setup Tools' uses: ./.github/actions/setup-tools - - name: 'Verify iOS + Android + Web' + - name: 'Verify Android' working-directory: ./packages/capacitor-plugin - run: npm run verify + run: npm run verify:android - build-example-app: - needs: ['verify-plugin'] + verify-plugin-ios: + needs: ['setup', 'lint', 'build'] runs-on: 'macos-15' timeout-minutes: 30 steps: - uses: actions/checkout@v4 - name: 'Setup Tools' uses: ./.github/actions/setup-tools - - name: 'Build plugin' + - name: 'Verify iOS' working-directory: ./packages/capacitor-plugin - run: npm run build - - name: 'Install example app dependencies' - working-directory: ./packages/example-app-capacitor - run: npm i - - name: 'Build Web example app' - working-directory: ./packages/example-app-capacitor - run: npm run build - - name: 'Sync example app native platforms' - working-directory: ./packages/example-app-capacitor - run: npx cap sync + run: npm run verify:ios + + build-example-app-android: + needs: ['verify-plugin-ios', 'verify-plugin-android'] + runs-on: 'macos-15' + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - name: 'Setup Tools' + uses: ./.github/actions/setup-tools + - name: 'Prepare example app' + uses: ./.github/actions/prepare-example-app - name: 'Build Android example app' working-directory: ./packages/example-app-capacitor/android run: ./gradlew clean assembleDebug + + build-example-app-ios: + needs: ['verify-plugin-ios', 'verify-plugin-android'] + runs-on: 'macos-15' + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - name: 'Setup Tools' + uses: ./.github/actions/setup-tools + - name: 'Prepare example app' + uses: ./.github/actions/prepare-example-app - name: 'Build iOS example app' working-directory: ./packages/example-app-capacitor/ios/App run: xcodebuild clean build -workspace App.xcworkspace -scheme App CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \ No newline at end of file From 847b7e13536fd827b205b57c2e8610f62b555436 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Wed, 10 Sep 2025 11:27:30 +0100 Subject: [PATCH 3/5] chore(ci): Add missing shell attribution to action --- .github/actions/prepare-example-app/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/prepare-example-app/action.yml b/.github/actions/prepare-example-app/action.yml index 9823e39..1617848 100644 --- a/.github/actions/prepare-example-app/action.yml +++ b/.github/actions/prepare-example-app/action.yml @@ -6,13 +6,17 @@ runs: steps: - name: 'Build plugin' working-directory: ./packages/capacitor-plugin + shell: bash run: npm run build - name: 'Install example app dependencies' working-directory: ./packages/example-app-capacitor + shell: bash run: npm i - name: 'Build Web example app' working-directory: ./packages/example-app-capacitor + shell: bash run: npm run build - name: 'Sync example app native platforms' working-directory: ./packages/example-app-capacitor + shell: bash run: npx cap sync \ No newline at end of file From 1db9a3e6a212bf997d849f6bdb66bb25298ae144 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Wed, 10 Sep 2025 11:48:33 +0100 Subject: [PATCH 4/5] chore(ci): Fully separate verifications by platform --- .github/workflows/continuous_integration.yml | 30 ++++---------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index f7aca7c..e7b854a 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -27,6 +27,11 @@ jobs: - name: 'Verify Android' working-directory: ./packages/capacitor-plugin run: npm run verify:android + - name: 'Prepare example app' + uses: ./.github/actions/prepare-example-app + - name: 'Build Android example app' + working-directory: ./packages/example-app-capacitor/android + run: ./gradlew clean assembleDebug verify-plugin-ios: needs: ['setup', 'lint', 'build'] @@ -39,31 +44,8 @@ jobs: - name: 'Verify iOS' working-directory: ./packages/capacitor-plugin run: npm run verify:ios - - build-example-app-android: - needs: ['verify-plugin-ios', 'verify-plugin-android'] - runs-on: 'macos-15' - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - name: 'Setup Tools' - uses: ./.github/actions/setup-tools - - name: 'Prepare example app' - uses: ./.github/actions/prepare-example-app - - name: 'Build Android example app' - working-directory: ./packages/example-app-capacitor/android - run: ./gradlew clean assembleDebug - - build-example-app-ios: - needs: ['verify-plugin-ios', 'verify-plugin-android'] - runs-on: 'macos-15' - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - name: 'Setup Tools' - uses: ./.github/actions/setup-tools - name: 'Prepare example app' uses: ./.github/actions/prepare-example-app - name: 'Build iOS example app' working-directory: ./packages/example-app-capacitor/ios/App - run: xcodebuild clean build -workspace App.xcworkspace -scheme App CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \ No newline at end of file + run: xcodebuild clean build -workspace App.xcworkspace -scheme App CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO From 5b3569f7a1833bdb474536ef88d5d6c5521f7cdc Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Wed, 10 Sep 2025 12:07:40 +0100 Subject: [PATCH 5/5] Revert "chore(ci): Fully separate verifications by platform" This reverts commit 1db9a3e6a212bf997d849f6bdb66bb25298ae144. --- .github/workflows/continuous_integration.yml | 30 ++++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index e7b854a..f7aca7c 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -27,11 +27,6 @@ jobs: - name: 'Verify Android' working-directory: ./packages/capacitor-plugin run: npm run verify:android - - name: 'Prepare example app' - uses: ./.github/actions/prepare-example-app - - name: 'Build Android example app' - working-directory: ./packages/example-app-capacitor/android - run: ./gradlew clean assembleDebug verify-plugin-ios: needs: ['setup', 'lint', 'build'] @@ -44,8 +39,31 @@ jobs: - name: 'Verify iOS' working-directory: ./packages/capacitor-plugin run: npm run verify:ios + + build-example-app-android: + needs: ['verify-plugin-ios', 'verify-plugin-android'] + runs-on: 'macos-15' + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - name: 'Setup Tools' + uses: ./.github/actions/setup-tools + - name: 'Prepare example app' + uses: ./.github/actions/prepare-example-app + - name: 'Build Android example app' + working-directory: ./packages/example-app-capacitor/android + run: ./gradlew clean assembleDebug + + build-example-app-ios: + needs: ['verify-plugin-ios', 'verify-plugin-android'] + runs-on: 'macos-15' + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - name: 'Setup Tools' + uses: ./.github/actions/setup-tools - name: 'Prepare example app' uses: ./.github/actions/prepare-example-app - name: 'Build iOS example app' working-directory: ./packages/example-app-capacitor/ios/App - run: xcodebuild clean build -workspace App.xcworkspace -scheme App CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO + run: xcodebuild clean build -workspace App.xcworkspace -scheme App CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \ No newline at end of file