diff --git a/.github/workflows/objective-c-xcode.yml b/.github/workflows/objective-c-xcode.yml new file mode 100644 index 00000000000..6d3e570fbe0 --- /dev/null +++ b/.github/workflows/objective-c-xcode.yml @@ -0,0 +1,21 @@ +name: Xcode - Build and Analyze + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + name: Build and analyse default scheme using xcodebuild command + runs-on: macos-latest-xlarge + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build + run: | + brew install tuist && + tuist generate && + ruby ci_scripts/test.rb --device "iPhone 14" --version 16.4 --scheme StripeiOS | xcpretty diff --git a/bitrise.yml b/bitrise.yml deleted file mode 100644 index 6e15937f349..00000000000 --- a/bitrise.yml +++ /dev/null @@ -1,606 +0,0 @@ -format_version: "11" -default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git -project_type: ios -app: - envs: - - FASTLANE_XCODE_LIST_TIMEOUT: "120" - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12 mini,OS=16.4 - - BITRISE_PROJECT_PATH: Stripe.xcworkspace - - GIT_AUTHOR_NAME: Bitrise CI - - GIT_AUTHOR_EMAIL: mobile-sdk-team@stripe.com - - GIT_COMMITTER_NAME: Bitrise CI - - GIT_COMMITTER_EMAIL: mobile-sdk-team@stripe.com - - opts: - is_expand: false - FASTLANE_WORK_DIR: . - - opts: - is_expand: false - FASTLANE_LANE: ios integration_all -trigger_map: -- push_branch: master - pipeline: main-trigger-pipeline -- pull_request_source_branch: releases/* - pipeline: releases-trigger-pipeline -- pull_request_source_branch: '*' - pipeline: main-trigger-pipeline -pipelines: - main-trigger-pipeline: - stages: - - stage-trigger-run-all: {} - releases-trigger-pipeline: - stages: - - stage-releases-run-all: {} - nightly-pipeline: - stages: - - stage-nightly-all: {} -stages: - stage-trigger-run-all: - workflows: - - framework-tests: {} - - test-builds-xcode-143: {} - - test-builds-xcode-15: {} - - test-builds-xcode-143-release: {} - - install-tests-non-carthage: {} - - lint-tests: {} - - size-report: {} - - ui-tests-1: {} - - ui-tests-2: {} - - integration-all: {} - - deploy-dry-run: {} - stage-releases-run-all: - workflows: - - framework-tests: {} - - test-builds-xcode-143: {} - - test-builds-xcode-15: {} - - deploy-docs: {} - - install-tests-non-carthage: {} - - lint-tests: {} - - size-report: {} - - basic-integration-tests: {} - - ui-tests-1: {} - - ui-tests-2: {} - - legacy-tests-14: {} - - carthage-install-test: {} - - pod-lint-tests: {} - - integration-all: {} - stage-nightly-all: - workflows: - - basic-integration-tests: {} - - check-docs: {} - - legacy-tests-14: {} - - carthage-install-test: {} - - data-theorem-sast: {} - - deploy-dry-run: {} - - pod-lint-tests: {} -workflows: - basic-integration-tests: - steps: - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: Basic Integration - - deploy-to-bitrise-io@2: {} - before_run: - - prep_all - after_run: - - notify_ci - envs: - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12 mini,OS=16.1 - carthage-install-test: - steps: - - fastlane@3: - inputs: - - lane: installation_carthage - title: fastlane installation_carthage - before_run: - - prep_all - after_run: - - notify_ci - envs: - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12 mini,OS=16.1 - check-docs: - steps: - - script@1: - inputs: - - content: bundle exec ./ci_scripts/build_documentation.rb - title: Build documentation - before_run: - - prep_all - after_run: - - notify_ci - data-theorem-sast: - steps: - - script@1: - inputs: - - content: bundle config set path 'vendor/bundle' - is_always_run: true - title: Set Bundler to use local vendor directory - - script@1: - inputs: - - content: bundle config set without 'development' - title: Set bundler to ignore development and test gems - - git-clone@6: {} - - cache-pull@2: {} - - tuist@0: - run_if: .IsCI - inputs: - - command: generate -n - - bundler@0: {} - - cache-push@2: - inputs: - - compress_archive: "true" - - cache_paths: | - vendor - SourcePackages - - script@1: - inputs: - - content: bundle exec ./ci_scripts/push_dt.rb "$BITRISE_GIT_BRANCH" "$DT_UPLOAD_API_KEY" - title: Submit app to Data Theorem for SAST - after_run: - - notify_ci - deploy-docs: - steps: - - activate-ssh-key@4: {} - - script@1: - inputs: - - content: bundle config set path 'vendor/bundle' - is_always_run: true - title: Set Bundler to use local vendor directory - - git-clone@6: - inputs: - - merge_pr: "no" - - fetch_tags: "yes" - - cache-pull@2: {} - - bundler@0: {} - - cache-push@2: - inputs: - - compress_archive: "true" - - cache_paths: | - vendor - SourcePackages - - script@1: - inputs: - - content: git fetch origin - title: Fetch full branch history - - script@1: - inputs: - - content: bundle exec ./ci_scripts/build_documentation.rb --publish - title: Build documentation - deploy-dry-run: - steps: - - script@1: - inputs: - - content: brew install sourcekitten - is_always_run: true - title: Install Sourcekitten - - script@1: - inputs: - - content: bundle exec ./ci_scripts/create_release.rb --version 99.99.99 --dry-run - is_always_run: true - title: Create release - - script@1: - inputs: - - content: bundle exec ./ci_scripts/deploy_release.rb --dry-run - is_always_run: true - title: Deploy release - before_run: - - prep_all - after_run: - - notify_ci - meta: - bitrise.io: - stack: osx-xcode-14.1.x-ventura - machine_type_id: g2-m1.8core - envs: - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12 mini,OS=16.1 - deploy-example-apps: - steps: - - set-xcode-build-number@1: - inputs: - - plist_path: '$BITRISE_SOURCE_DIR/Example/PaymentSheet Example/PaymentSheet Example/Info.plist' - - set-xcode-build-number@1: - inputs: - - plist_path: '$BITRISE_SOURCE_DIR/Example/IdentityVerification Example/IdentityVerification Example/Info.plist' - - xcode-archive@4: - inputs: - - project_path: Stripe.xcworkspace - - distribution_method: app-store - - automatic_code_signing: apple-id - - xcodebuild_options: DEVELOPMENT_TEAM=Y28TH9SHX7 - - scheme: PaymentSheet Example - - xcode-archive@4: - inputs: - - project_path: Stripe.xcworkspace - - distribution_method: app-store - - automatic_code_signing: apple-id - - xcodebuild_options: DEVELOPMENT_TEAM=Y28TH9SHX7 - - scheme: IdentityVerification Example - - deploy-to-bitrise-io@2: {} - before_run: - - prep_all - financial-connections-stability-tests: - before_run: - - prep_all - steps: - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: FinancialConnections Example - - pagerduty@0: - is_always_run: true - run_if: .IsBuildFailed - inputs: - - event_description: iOS E2E tests failing! $BITRISE_BUILD_URL. - - integration_key: $AUX_PAGERDUTY_INTEGRATION_KEY - - slack@3: - is_always_run: true - run_if: .IsBuildFailed - inputs: - - webhook_url: $SLACK_KGAIDIS_TESTING_WEBHOOK_URL - - webhook_url_on_error: $SLACK_KGAIDIS_TESTING_WEBHOOK_URL - - deploy-to-bitrise-io@2: {} - envs: - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12 mini,OS=16.1 - financial-connections-stability-tests-for-edge: - before_run: - - prep_all - steps: - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: FinancialConnections Example - - deploy-to-bitrise-io@2: {} - envs: - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12 mini,OS=16.1 - framework-tests: - steps: - - fastlane@3: - inputs: - - lane: preflight - title: fastlane preflight - - fastlane@3: - inputs: - - lane: threeds2_tests - title: fastlane threeds2_tests - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripeiOS - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripePayments - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripePaymentsUI - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripePaymentSheet - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripeCameraCore - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripeCore - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripeIdentity - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripeFinancialConnections - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripeCardScan - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripeApplePay - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripeUICore - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: StripeLinkCore - - deploy-to-bitrise-io@2: {} - - save-spm-cache@1: {} - before_run: - - prep_all - after_run: [] - meta: - bitrise.io: - stack: osx-xcode-14.3.x-ventura - machine_type_id: g2-m1.8core - test-builds-xcode-143: - steps: - - xcode-build-for-test@2: - inputs: - - scheme: AllStripeFrameworks - before_run: - - prep_all - meta: - bitrise.io: - stack: osx-xcode-14.3.x-ventura - machine_type_id: g2-m1.8core - test-builds-xcode-143-release: - steps: - - xcode-build-for-test@2: - inputs: - - scheme: AllStripeFrameworks - - configuration: Release - before_run: - - prep_all - meta: - bitrise.io: - stack: osx-xcode-14.3.x-ventura - machine_type_id: g2-m1.8core - test-builds-xcode-15: - steps: - - xcode-build-for-test@2: - inputs: - - scheme: AllStripeFrameworks - envs: - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12,OS=17.0 - before_run: - - prep_all - meta: - bitrise.io: - stack: osx-xcode-15.0.x - machine_type_id: g2-m1.8core - install-tests-non-carthage: - steps: - - fastlane@3: - inputs: - - lane: installation_cocoapods_without_frameworks_objc - title: fastlane installation_cocoapods_without_frameworks_objc - - fastlane@3: - inputs: - - lane: installation_cocoapods_frameworks_objc - title: fastlane installation_cocoapods_frameworks_objc - - fastlane@3: - inputs: - - lane: installation_cocoapods_frameworks_swift - title: fastlane installation_cocoapods_frameworks_swift - - fastlane@3: - inputs: - - lane: installation_spm_objc - title: fastlane installation_spm_objc - - fastlane@3: - inputs: - - lane: installation_spm_swift - title: fastlane installation_spm_swift - before_run: - - prep_all - envs: - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12 mini,OS=16.1 - integration-all: - steps: - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: IntegrationTester - - log_formatter: xcbeautify - - deploy-to-bitrise-io@2: {} - before_run: - - prep_all - meta: - bitrise.io: - stack: osx-xcode-14.1.x-ventura - machine_type_id: g2-m1-max.10core - envs: - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12 mini,OS=16.1 - legacy-tests-14: - steps: - - fastlane@3: - inputs: - - lane: legacy_tests_14 - title: fastlane legacy_tests_14 - envs: - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 8,OS=14.5 - meta: - bitrise.io: - stack: osx-xcode-14.3.x-ventura - machine_type_id: g2-m1.8core - - before_run: - - prep_all - after_run: - - upload_logs - - notify_ci - lint-tests: - steps: - - script@1: - inputs: - - content: ./ci_scripts/lint_modified_files.sh - title: Run swiftlint - - script@1: - inputs: - - content: ./ci_scripts/check_paymentsheet_test_sharding.rb - title: Check PaymentSheet test sharding - - script@1: - inputs: - - content: ./ci_scripts/check_image_format.sh - title: Check png image format is 8-bit - - fastlane@3: - inputs: - - lane: build_extras - title: fastlane build_extras - - fastlane@3: - inputs: - - lane: analyze - title: fastlane analyze - before_run: - - prep_all - meta: - bitrise.io: - stack: osx-xcode-14.3.x-ventura - machine_type_id: g2-m1.8core - notify_ci: - steps: - - script@1: - inputs: - - content: ./ci_scripts/notify_ci.rb - title: Send notification if failed - is_always_run: true - run_if: .IsBuildFailed - pod-lint-tests: - steps: - - script@1: - inputs: - - content: pod lib lint --include-podspecs='*.podspec' - title: pod lib lint - before_run: - - prep_all - envs: - - DEFAULT_TEST_DEVICE: platform=iOS Simulator,name=iPhone 12 mini,OS=16.1 - prep_all: - steps: - - xcode-start-simulator@0: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - set-env-var@0: - inputs: - - destination_keys: CONFIGURATION_BUILD_DIR - - value: $BITRISE_SOURCE_DIR/stpbuild/products - title: Set CONFIGURATION_BUILD_DIR - - set-env-var@0: - inputs: - - destination_keys: CONFIGURATION_TEMP_DIR - - value: $BITRISE_SOURCE_DIR/stpbuild/intermediates - title: Set CONFIGURATION_TEMP_DIR - - script@1: - inputs: - - content: bundle config set path 'vendor/bundle' - is_always_run: true - title: Set Bundler to use local vendor directory - - git-clone@6: - inputs: - - clone_depth: "1" - - tuist@0: - run_if: .IsCI - inputs: - - command: generate -n - - cache-pull@2: {} - - bundler@0: {} - - cache-push@2: - inputs: - - compress_archive: "true" - - cache_paths: | - vendor - - restore-spm-cache@1: {} - size-report: - steps: - - script@1: - inputs: - - content: bundle config set path 'vendor/bundle' - is_always_run: true - title: Set Bundler to use local vendor directory - - git-clone@6: - inputs: - - merge_pr: "no" - - fetch_tags: "yes" - - cache-pull@2: {} - - bundler@0: {} - - cache-push@2: - inputs: - - compress_archive: "true" - - cache_paths: | - vendor - SourcePackages - - script@1: - inputs: - - content: git fetch origin - title: Fetch full branch history - - script@1: - inputs: - - content: bundle exec fastlane size_report - title: Generate size report - ui-tests-1: - steps: - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: PaymentSheet Example - - test_plan: PaymentSheet Example-Shard1 - - log_formatter: xcbeautify - - xcodebuild_options: -maximum-concurrent-test-simulator-destinations 2 -maximum-parallel-testing-workers 2 - - deploy-to-bitrise-io@2: {} - before_run: - - prep_all - meta: - bitrise.io: - stack: osx-xcode-14.3.x-ventura - machine_type_id: g2-m1-max.10core - ui-tests-2: - steps: - - xcode-test@4: - inputs: - - destination: $DEFAULT_TEST_DEVICE - - test_repetition_mode: retry_on_failure - - maximum_test_repetitions: "5" - - scheme: PaymentSheet Example - - test_plan: PaymentSheet Example-Shard2 - - log_formatter: xcbeautify - - xcodebuild_options: -maximum-concurrent-test-simulator-destinations 2 -maximum-parallel-testing-workers 2 - - deploy-to-bitrise-io@2: {} - before_run: - - prep_all - meta: - bitrise.io: - stack: osx-xcode-14.3.x-ventura - machine_type_id: g2-m1-max.10core - upload_logs: - steps: - - deploy-to-bitrise-io@2: - inputs: - - notify_user_groups: none - - is_compress: "true" - - deploy_path: build-ci-tests/Logs/Test - - is_enable_public_page: "false" - title: Deploy test log artifacts -meta: - bitrise.io: - stack: osx-xcode-14.1.x-ventura - machine_type_id: g2-m1.8core