From 25d35b45dbc2258020416287b22f227fdd7d432c Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 18:50:08 -0500 Subject: [PATCH 01/18] fix: using podspec filter and codegen config --- package.json | 10 ++++++++++ react-native-fast-openpgp.podspec | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 31d3cc5..4f04df6 100644 --- a/package.json +++ b/package.json @@ -166,5 +166,15 @@ "dependencies": { "big-integer": "^1.6.51", "flatbuffers": "2.0.6" + }, + "codegenConfig": { + "name": "RNFastOpenpgpSpec", + "type": "modules", + "jsSrcsDir": "src" + }, + "create-react-native-library": { + "type": "module-mixed", + "languages": "cpp", + "version": "0.38.2" } } diff --git a/react-native-fast-openpgp.podspec b/react-native-fast-openpgp.podspec index 07b031a..6700041 100644 --- a/react-native-fast-openpgp.podspec +++ b/react-native-fast-openpgp.podspec @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.platforms = { :ios => "11.0" } s.source = { :git => "https://github.com/jerson/react-native-fast-openpgp.git", :tag => "#{s.version}" } - s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}" + s.source_files = "ios/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}" s.vendored_framework = 'ios/Openpgp.xcframework' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } From 1c95ce7a39b3f88e8a95ef9a36a9bd1e67b3db8f Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 18:54:34 -0500 Subject: [PATCH 02/18] fix: disabled new arch --- ios/FastOpenpgp.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ios/FastOpenpgp.h b/ios/FastOpenpgp.h index 9f00308..9324250 100644 --- a/ios/FastOpenpgp.h +++ b/ios/FastOpenpgp.h @@ -2,15 +2,9 @@ #import "react-native-fast-openpgp.h" #endif -#ifdef RCT_NEW_ARCH_ENABLED -#import "RNFastOpenpgpSpec.h" - -@interface FastOpenpgp : NSObject -#else #import @interface FastOpenpgp : NSObject -#endif @property (nonatomic, assign) BOOL setBridgeOnMainQueue; @end From ede1bbdfca290024701a70ca0746afba6f3598a1 Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 19:01:05 -0500 Subject: [PATCH 03/18] chore: updated version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f04df6..8d4c379 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-fast-openpgp", - "version": "2.7.3", + "version": "2.7.4", "description": "library for use openPGP", "main": "lib/commonjs/index", "module": "lib/module/index", From 5329937b31181c2fc79710b6c947d6e57ade48d9 Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 19:19:09 -0500 Subject: [PATCH 04/18] chore: updated android action --- .github/workflows/android.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1e6465a..65d0a42 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -18,17 +18,10 @@ jobs: ~/.gradle/caches ~/.gradle/wrapper key: gradle - - uses: actions/cache@v3 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/adb* - key: avd - uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - uses: android-actions/setup-android@v2 - name: Android Deps run: | @@ -48,16 +41,6 @@ jobs: ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - run: yarn example start & timeout-minutes: 10 - - if: steps.avd-cache.outputs.cache-hit != 'true' - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: 29 - avd-name: PhoneAPI30 - arch: x86_64 - force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - disable-animations: false - script: echo "Generated AVD snapshot for caching." - uses: reactivecircus/android-emulator-runner@v2 with: api-level: 29 From 3ad092591be685bb67d4b233902f5afac6066200 Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 19:28:11 -0500 Subject: [PATCH 05/18] chore: updated android --- .github/workflows/android.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 65d0a42..88e7f0a 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -31,10 +31,14 @@ jobs: id: setup-ndk with: ndk-version: r21d + - uses: actions/setup-node@v4 + with: + node-version: 20 - name: Set up Node run: | npm install -g detox-cli npm install -g yarn + npm install -g node-gyp - run: yarn - run: yarn example build:android env: From 8fe4fc367be89a7ba395eb613fec9d48bcd782e2 Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 19:45:00 -0500 Subject: [PATCH 06/18] chore: updated android --- .github/workflows/android.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 88e7f0a..c877e81 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -9,7 +9,7 @@ on: jobs: e2e: - runs-on: macos-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/cache@v3 @@ -18,6 +18,17 @@ jobs: ~/.gradle/caches ~/.gradle/wrapper key: gradle + - name: Cache dependencies + id: yarn-cache + uses: actions/cache@v3 + with: + path: | + **/node_modules + .yarn/install-state.gz + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} + restore-keys: | + ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + ${{ runner.os }}-yarn- - uses: actions/setup-java@v3 with: distribution: 'temurin' @@ -39,12 +50,20 @@ jobs: npm install -g detox-cli npm install -g yarn npm install -g node-gyp - - run: yarn + - name: Install dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --immutable + shell: bash - run: yarn example build:android env: ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - run: yarn example start & timeout-minutes: 10 + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm - uses: reactivecircus/android-emulator-runner@v2 with: api-level: 29 From b0fd654e721f936f78140f8b67955c94c324a67b Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 19:45:39 -0500 Subject: [PATCH 07/18] chore: updated android --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index c877e81..42233d0 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -44,7 +44,7 @@ jobs: ndk-version: r21d - uses: actions/setup-node@v4 with: - node-version: 20 + node-version-file: .nvmrc - name: Set up Node run: | npm install -g detox-cli From fe1a7119fca6f8f21e5219ac5abc7669f815ee86 Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 19:55:30 -0500 Subject: [PATCH 08/18] chore: updated android action --- .github/workflows/android.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 42233d0..61ed726 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -69,7 +69,5 @@ jobs: api-level: 29 avd-name: PhoneAPI30 arch: x86_64 - force-avd-creation: false - emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true script: yarn example test:android From 23ab3739912bbaff30a6dc05803a1ea0be239527 Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 20:02:53 -0500 Subject: [PATCH 09/18] chore: updated android action --- .github/workflows/android.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 61ed726..5ab7f05 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -9,7 +9,7 @@ on: jobs: e2e: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - uses: actions/checkout@v3 - uses: actions/cache@v3 @@ -59,15 +59,9 @@ jobs: ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - run: yarn example start & timeout-minutes: 10 - - name: Enable KVM - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - uses: reactivecircus/android-emulator-runner@v2 with: api-level: 29 avd-name: PhoneAPI30 - arch: x86_64 disable-animations: true script: yarn example test:android From 5da11ea8ab16cdb40546e5b8910a02c59f8c2aec Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 20:21:02 -0500 Subject: [PATCH 10/18] chore: updated android action --- .github/workflows/android.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 5ab7f05..f15ee90 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -63,5 +63,6 @@ jobs: with: api-level: 29 avd-name: PhoneAPI30 + arch: arm64-v8a disable-animations: true script: yarn example test:android From 1380d96f9a764ada964672994183c7c6fff4b7eb Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Thu, 18 Jul 2024 20:34:58 -0500 Subject: [PATCH 11/18] chore: updated android action --- .github/workflows/android.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f15ee90..bfa21f8 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -65,4 +65,5 @@ jobs: avd-name: PhoneAPI30 arch: arm64-v8a disable-animations: true + channel: canary script: yarn example test:android From 91498859600ea838b92e7b0b869ae483e5992cb9 Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Fri, 19 Jul 2024 14:50:42 -0500 Subject: [PATCH 12/18] chore: updated android action --- .github/workflows/android.yml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index bfa21f8..613ea2c 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -9,17 +9,10 @@ on: jobs: e2e: - runs-on: macos-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle - - name: Cache dependencies - id: yarn-cache + - id: yarn-cache uses: actions/cache@v3 with: path: | @@ -34,10 +27,6 @@ jobs: distribution: 'temurin' java-version: '17' - uses: android-actions/setup-android@v2 - - name: Android Deps - run: | - rm -rf ~/Library/Android/sdk/ndk || echo "skipped" - rm -rf ~/Library/Android/sdk/ndk-bundle || echo "skipped" - uses: nttld/setup-ndk@v1 id: setup-ndk with: @@ -45,25 +34,29 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: .nvmrc - - name: Set up Node - run: | + - run: | npm install -g detox-cli npm install -g yarn npm install -g node-gyp - - name: Install dependencies - if: steps.yarn-cache.outputs.cache-hit != 'true' + - if: steps.yarn-cache.outputs.cache-hit != 'true' run: yarn install --immutable shell: bash - run: yarn example build:android env: ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} + - run: | + du -sch ./* + rm -rf ~/.gradle - run: yarn example start & timeout-minutes: 10 + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm - uses: reactivecircus/android-emulator-runner@v2 with: api-level: 29 avd-name: PhoneAPI30 - arch: arm64-v8a disable-animations: true - channel: canary script: yarn example test:android From 613d25c7cbcf6bd205a77cf3bd29fbccb234ca34 Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Fri, 19 Jul 2024 15:01:51 -0500 Subject: [PATCH 13/18] chore: updated android action --- .github/workflows/android.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 613ea2c..f5284a0 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -46,6 +46,11 @@ jobs: ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - run: | du -sch ./* + du -sch ./android/* + du -sch ./example/android/* + du -sch ./example/android/app/* + du -sch ~/.gradle + du -sch /usr/local/lib/android/sdk/system-images/ rm -rf ~/.gradle - run: yarn example start & timeout-minutes: 10 @@ -58,5 +63,6 @@ jobs: with: api-level: 29 avd-name: PhoneAPI30 + disk-size: 1024M disable-animations: true script: yarn example test:android From 50f4972a242d8a878cf867a9dbaf79234115020c Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Fri, 19 Jul 2024 15:09:38 -0500 Subject: [PATCH 14/18] chore: updated android action --- .github/workflows/android.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f5284a0..002972b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -50,7 +50,8 @@ jobs: du -sch ./example/android/* du -sch ./example/android/app/* du -sch ~/.gradle - du -sch /usr/local/lib/android/sdk/system-images/ + du -sch /usr/local/lib/android/* + du -sch /usr/local/lib/android/sdk/* rm -rf ~/.gradle - run: yarn example start & timeout-minutes: 10 From f1bef345b9263d66d17dec7dcd6a1716a563cd7b Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Fri, 19 Jul 2024 15:10:03 -0500 Subject: [PATCH 15/18] chore: updated android action --- .github/workflows/android.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 002972b..b426a27 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -52,6 +52,7 @@ jobs: du -sch ~/.gradle du -sch /usr/local/lib/android/* du -sch /usr/local/lib/android/sdk/* + du -sch ~/* rm -rf ~/.gradle - run: yarn example start & timeout-minutes: 10 From 4d9bb51ab364b0dfba0a04c04de14a18a9857a51 Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Fri, 19 Jul 2024 15:19:10 -0500 Subject: [PATCH 16/18] chore: updated android action --- .github/workflows/android.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index b426a27..903ac38 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -45,15 +45,9 @@ jobs: env: ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - run: | - du -sch ./* - du -sch ./android/* - du -sch ./example/android/* - du -sch ./example/android/app/* - du -sch ~/.gradle - du -sch /usr/local/lib/android/* - du -sch /usr/local/lib/android/sdk/* - du -sch ~/* + du -sch /usr/local/lib/android/sdk/ndk/* rm -rf ~/.gradle + rm -rf /usr/local/lib/android/sdk/ndk/ - run: yarn example start & timeout-minutes: 10 - name: Enable KVM From 841460bf6f6dfe649bfecb36ebd9c0e51b8c05ed Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Fri, 19 Jul 2024 15:19:24 -0500 Subject: [PATCH 17/18] chore: updated android action --- .github/workflows/android.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 903ac38..d0abc69 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -59,6 +59,5 @@ jobs: with: api-level: 29 avd-name: PhoneAPI30 - disk-size: 1024M disable-animations: true script: yarn example test:android From 50efe3d7c4c9f1e43545108c8a273b3e1fe4b9ad Mon Sep 17 00:00:00 2001 From: Gerson Alexander Pardo Gamez Date: Fri, 19 Jul 2024 15:45:43 -0500 Subject: [PATCH 18/18] chore: updated android action --- .github/workflows/android.yml | 1 - .github/workflows/ios.yml | 32 ++++++++++++++++++++------------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index d0abc69..b4a78d0 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -45,7 +45,6 @@ jobs: env: ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - run: | - du -sch /usr/local/lib/android/sdk/ndk/* rm -rf ~/.gradle rm -rf /usr/local/lib/android/sdk/ndk/ - run: yarn example start & diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 4022d5b..0ef1a4b 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -2,32 +2,40 @@ name: iOS on: workflow_dispatch: -# pull_request: -# push: -# tags: -# - 'v*' + pull_request: + push: + tags: + - 'v*' jobs: e2e: runs-on: macos-latest steps: - uses: actions/checkout@v3 - - uses: actions/cache@v3 - id: ios-cache + - id: yarn-cache + uses: actions/cache@v3 with: path: | - example/ios/build/* - example/ios/Pods/* - key: ios - - name: Set up Node - run: | + **/node_modules + .yarn/install-state.gz + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} + restore-keys: | + ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + ${{ runner.os }}-yarn- + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + - run: | npm install -g detox-cli npm install -g yarn + npm install -g node-gyp - name: Install Detox run: | brew tap wix/brew brew install applesimutils - - run: yarn + - if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --immutable + shell: bash - run: yarn example build:ios - run: yarn example start & timeout-minutes: 20