Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ios archive #108

Merged
merged 18 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 26 additions & 33 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,61 +9,54 @@ on:

jobs:
e2e:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- id: yarn-cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle
- uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd
**/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'
java-version: '11'
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:
ndk-version: r21d
- name: Set up Node
run: |
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: |
npm install -g detox-cli
npm install -g yarn
- run: yarn
npm install -g node-gyp
- 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: |
rm -rf ~/.gradle
rm -rf /usr/local/lib/android/sdk/ndk/
- 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."
- 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
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
32 changes: 20 additions & 12 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions ios/FastOpenpgp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@
#import "react-native-fast-openpgp.h"
#endif

#ifdef RCT_NEW_ARCH_ENABLED
#import "RNFastOpenpgpSpec.h"

@interface FastOpenpgp : NSObject <NativeFastOpenpgpSpec>
#else
#import <React/RCTBridgeModule.h>

@interface FastOpenpgp : NSObject <RCTBridgeModule>
#endif
@property (nonatomic, assign) BOOL setBridgeOnMainQueue;

@end
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion react-native-fast-openpgp.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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' }

Expand Down
Loading