Skip to content

ci: validate release post check job #1305

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7a1d505
chore: Validate release post check job
AyaMahmoud148 Oct 31, 2024
1003681
fix: remove instabug-reactnative from package.json
AyaMahmoud148 Oct 31, 2024
0fdffe5
fix: enhance formatter
AyaMahmoud148 Oct 31, 2024
45c0a3c
fix: ios failure
AyaMahmoud148 Oct 31, 2024
6e0de65
fix: add ios version
AyaMahmoud148 Oct 31, 2024
f544897
fix: fix config.yml formatting
AyaMahmoud148 Oct 31, 2024
05a8e71
fix: e2e test failure
AyaMahmoud148 Oct 31, 2024
efb893a
fix: project.pbxproj
AyaMahmoud148 Oct 31, 2024
4353768
chore: restrict on master branch
AyaMahmoud148 Oct 31, 2024
eb168ed
fix: symlink instabug-reactnative
AyaMahmoud148 Oct 31, 2024
4fa1ad5
fix: rename jobs
AyaMahmoud148 Oct 31, 2024
c54e888
fix: lint
AyaMahmoud148 Oct 31, 2024
d526791
fix: generalize release jobs
AyaMahmoud148 Oct 31, 2024
2298234
fix: enhnace package.json
AyaMahmoud148 Oct 31, 2024
52a22ec
fix: validate config.yml
AyaMahmoud148 Oct 31, 2024
aea4f53
revert: just checking the ci jobs
AyaMahmoud148 Oct 31, 2024
f0c260c
fix: run on release scheme
AyaMahmoud148 Oct 31, 2024
7fd23cb
fix: add bundling command
AyaMahmoud148 Oct 31, 2024
c5782c0
fix: metro.config.js
AyaMahmoud148 Oct 31, 2024
7d89228
fix: project.pbxproj
AyaMahmoud148 Oct 31, 2024
138f1f5
fix: update build file
AyaMahmoud148 Oct 31, 2024
4603f51
fix: release mode
AyaMahmoud148 Oct 31, 2024
eec34e6
fix: update podfile
AyaMahmoud148 Oct 31, 2024
b8eab91
fix: update build file
AyaMahmoud148 Oct 31, 2024
22de17c
fix: fix build project
AyaMahmoud148 Oct 31, 2024
4911a62
fix: add remove drived data
AyaMahmoud148 Oct 31, 2024
9dc493b
fix: fix simulator version
AyaMahmoud148 Oct 31, 2024
e0e0f43
fix: running hybrid app in release mode
AyaMahmoud148 Nov 2, 2024
11f7031
fix: update pod file
AyaMahmoud148 Nov 2, 2024
3015302
fix: try remove cache
AyaMahmoud148 Nov 2, 2024
50cabc7
revert: restrict jobs on master only
AyaMahmoud148 Nov 2, 2024
45aaf66
fix: using working directory instead of passing ios and android paths
AyaMahmoud148 Nov 3, 2024
2fd707c
fix: run build check on default example app
AyaMahmoud148 Nov 4, 2024
b7cf03f
fix: rename jobs based on guidelines
AyaMahmoud148 Nov 4, 2024
c476aa5
fix: formatter
AyaMahmoud148 Nov 4, 2024
3daf7fb
fix: add dynamic path for ios paths
AyaMahmoud148 Nov 4, 2024
bedab83
trying revert removing drived data
AyaMahmoud148 Nov 4, 2024
2109ea6
fix: delete unnicessary jobs
AyaMahmoud148 Nov 4, 2024
f066ba8
revert deleting dervied data
AyaMahmoud148 Nov 4, 2024
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
90 changes: 89 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,22 @@ commands:
- run:
name: Post comment on GitHub
command: ./scripts/notify-github.sh "<< parameters.data >>"
build_and_pack_sdk:
parameters:
working_directory:
type: string
default: ~/project
steps:
- install_node_modules
- run:
command: yarn build
working_directory: ~/project
- run:
command: yarn pack --filename InstabugSDK.tgz
working_directory: ~/project
- run:
command: yarn add file:../../InstabugSDK.tgz
working_directory: <<parameters.working_directory>>

jobs:
danger:
Expand Down Expand Up @@ -295,7 +311,7 @@ jobs:
-scheme InstabugExample \
-resultBundlePath coverage/result.xcresult \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 13 Pro Max,OS=15.5' \
-destination "platform=iOS Simulator,OS=15.5,name=iPhone 11 Pro Max" \
test | xcpretty
- when:
condition: << parameters.collect_coverage >>
Expand Down Expand Up @@ -487,6 +503,50 @@ jobs:
replace: $SNAPSHOT_VERSION
- notify_github:
data: "$(jq -Rcs '{ body: . }' scripts/snapshot-comment.md)"
build_check_android:
parameters:
working_directory:
type: string
executor:
name: android/android-machine
tag: '2024.01.1'
steps:
- advanced-checkout/shallow-checkout
- build_and_pack_sdk:
working_directory: << parameters.working_directory >>
- run:
name: Build Android
working_directory: <<parameters.working_directory>>/android
command: ./gradlew assembleRelease

build_check_ios:
parameters:
working_directory:
type: string
scheme:
type: string
workspace_path:
type: string
macos:
xcode: 13.4.1
resource_class: macos.m1.medium.gen1
steps:
- advanced-checkout/shallow-checkout
- build_and_pack_sdk:
working_directory: << parameters.working_directory >>
- install_pods:
working_directory: <<parameters.working_directory>>/ios
- run:
name: Build iOS
working_directory: <<parameters.working_directory>>/ios
command: |
yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios
rm -rf ~/Library/Developer/Xcode/DerivedData/*
xcodebuild -workspace <<parameters.workspace_path>>.xcworkspace \
-scheme <<parameters.scheme>> \
-configuration Release \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,OS=15.5,name=iPhone 11 Pro Max"

workflows:
publish:
Expand Down Expand Up @@ -607,9 +667,37 @@ workflows:
filters:
branches:
only: dream11
- hold_build_check:
type: approval
- build_check_android:
name: build_check_android_default
working_directory: ~/project/examples/default
requires:
- hold_build_check
- build_check_ios:
name: build_check_ios_default
working_directory: ~/project/examples/default
scheme: InstabugExample
workspace_path: InstabugExample
requires:
- hold_build_check
- build_check_android:
name: build_check_android_hybrid
working_directory: ~/project/examples/hybrid
requires:
- hold_build_check
- build_check_ios:
name: build_check_ios_hybrid
working_directory: ~/project/examples/hybrid
scheme: HybridSampleApp
workspace_path: HybridSampleApp
requires:
- hold_build_check
- release_custom_package:
name: release_dream11
requires:
- build_check_android_hybrid
- build_check_ios_hybrid
- hold_release_dream11
filters:
branches:
Expand Down
107 changes: 76 additions & 31 deletions examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
Expand Down
2 changes: 1 addition & 1 deletion examples/hybrid/ios/HybridSampleApp/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (nonatomic, strong) UIWindow *window; // Add this property
@end
36 changes: 23 additions & 13 deletions examples/hybrid/ios/HybridSampleApp/MainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,39 @@
#import <React/RCTRootView.h>
#import <Instabug/Instabug.h>
#import <Instabug/IBGCrashReporting.h>
@interface MainViewController ()

#import <React/RCTBundleURLProvider.h>
#import <React/RCTBridge.h>
@interface MainViewController () <RCTBridgeDelegate>
@property (nonatomic, strong) RCTBridge *bridge;
@end

@implementation MainViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:nil];
}
- (IBAction)startReactNative:(UIButton *)sender {
NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios"];

RCTRootView *rootView =
[[RCTRootView alloc] initWithBundleURL: jsCodeLocation
moduleName: @"HybridSampleApp"
initialProperties:nil
launchOptions: nil];
UIViewController *vc = [[UIViewController alloc] init];
vc.view = rootView;
[self presentViewController:vc animated:YES completion:nil];
- (IBAction)startReactNative:(UIButton *)sender {
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:self.bridge
moduleName:@"HybridSampleApp"
initialProperties:nil];
UIViewController *vc = [[UIViewController alloc] init];
vc.view = rootView;
[self presentViewController:vc animated:YES completion:nil];
}

// This will now be called by the bridge
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
NSLog(@"sourceURLForBridge called!"); // This will now print
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
- (IBAction)throwHandled:(UIButton *)sender {
NSException *exception = [NSException exceptionWithName:@"Objective-C Handled Exception"
reason:@"no reason"
Expand Down
11 changes: 9 additions & 2 deletions examples/hybrid/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,27 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ
platform :ios, '13.4'
prepare_react_native_project!

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end

target 'HybridSampleApp' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()

use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => false,
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
pod 'Instabug', '~> 13.4.2'

post_install do |installer|
react_native_post_install(
Expand Down
Loading