From 14caec1409cf93b64761e4bde4d90a501f18e2cb Mon Sep 17 00:00:00 2001 From: Ben Boral Date: Tue, 27 Apr 2021 11:46:11 -0500 Subject: [PATCH 01/28] ignore user data --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c545112 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +xcuserdata/ From 4f6015c37a84ee26e6f471872cc93f77ee5dfc5d Mon Sep 17 00:00:00 2001 From: Ben Boral Date: Wed, 28 Apr 2021 07:52:08 -0500 Subject: [PATCH 02/28] change that shouldnt invoke trigger --- bla.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 bla.txt diff --git a/bla.txt b/bla.txt new file mode 100644 index 0000000..7d7ace3 --- /dev/null +++ b/bla.txt @@ -0,0 +1 @@ +committing a file to a branch which should not trigger a workflow. Will confirm in app.bitrise.io/activity From e602a28c4cfa1a12ec8573c6cc72aa4e9c56fe18 Mon Sep 17 00:00:00 2001 From: Ben Boral Date: Thu, 6 May 2021 13:19:57 -0500 Subject: [PATCH 03/28] info on archiving --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ee7a5d8..f6939bd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # Bitrise-iOS-Sample -Simple iOS Project +Simple iOS Project with working bitrise.yml included in the root of the project that builds iOS .ipa and runs tests. -Working bitrise.yml included in the root of the project +## Bitrise Setup -bitrise.yml builds iOS .ipa and runs tests +Create a new project in Bitrise using this repo as you normally would. Use the `bitrise.yml` from the repo to define your workflows. + +In order to sign the app during the `release` workflow archive step, you must set a valid provisioning profile and signing certificate in the `bitrise.yml` (`BITRISE_PROFILE_ID` and `BITRISE_CODE_SIGNING_IDENTITY` env vars) and upload those to your account. More details can be found in the [internal wiki](https://bitrise.atlassian.net/wiki/spaces/~833061986/pages/1554875463/Demo+App-Bitrise+Deploy+Workflow). \ No newline at end of file From e61444d781bf5cca44432065330aa9fcf986dd69 Mon Sep 17 00:00:00 2001 From: Ben Boral Date: Thu, 6 May 2021 13:20:51 -0500 Subject: [PATCH 04/28] remove extra file --- bla.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 bla.txt diff --git a/bla.txt b/bla.txt deleted file mode 100644 index 7d7ace3..0000000 --- a/bla.txt +++ /dev/null @@ -1 +0,0 @@ -committing a file to a branch which should not trigger a workflow. Will confirm in app.bitrise.io/activity From dc69673a2e94aecbb98fd9b3f9f580da9dd9aef0 Mon Sep 17 00:00:00 2001 From: Ben Boral <82456480+benbitrise@users.noreply.github.com> Date: Thu, 6 May 2021 14:46:43 -0500 Subject: [PATCH 05/28] Correct workflow name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6939bd..09e8a1d 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,4 @@ Simple iOS Project with working bitrise.yml included in the root of the project Create a new project in Bitrise using this repo as you normally would. Use the `bitrise.yml` from the repo to define your workflows. -In order to sign the app during the `release` workflow archive step, you must set a valid provisioning profile and signing certificate in the `bitrise.yml` (`BITRISE_PROFILE_ID` and `BITRISE_CODE_SIGNING_IDENTITY` env vars) and upload those to your account. More details can be found in the [internal wiki](https://bitrise.atlassian.net/wiki/spaces/~833061986/pages/1554875463/Demo+App-Bitrise+Deploy+Workflow). \ No newline at end of file +In order to sign the app during the `deploy` workflow archive step, you must set a valid provisioning profile and signing certificate in the `bitrise.yml` (`BITRISE_PROFILE_ID` and `BITRISE_CODE_SIGNING_IDENTITY` env vars) and upload those to your account. More details can be found in the [internal wiki](https://bitrise.atlassian.net/wiki/spaces/~833061986/pages/1554875463/Demo+App-Bitrise+Deploy+Workflow). From 777fb6eedd1ae7eae03c5d1967245caa10cb8eae Mon Sep 17 00:00:00 2001 From: DamienBitrise <60897705+DamienBitrise@users.noreply.github.com> Date: Mon, 14 Jun 2021 11:02:03 -0700 Subject: [PATCH 06/28] remove recreate user schemes step --- bitrise.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index e165ba3..1e5ae42 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -15,9 +15,6 @@ workflows: - git-clone@4: {} - cache-pull@2: {} - certificate-and-profile-installer@1: {} - - recreate-user-schemes@1: - inputs: - - project_path: "$BITRISE_PROJECT_PATH" - xcode-archive@3: inputs: - project_path: "$BITRISE_PROJECT_PATH" @@ -37,9 +34,6 @@ workflows: - git-clone@4: {} - cache-pull@2: {} - certificate-and-profile-installer@1: {} - - recreate-user-schemes@1: - inputs: - - project_path: "$BITRISE_PROJECT_PATH" - xcode-test@2: inputs: - project_path: "$BITRISE_PROJECT_PATH" From a5338f8bb91dc63fe58815c2f599288f7283c13a Mon Sep 17 00:00:00 2001 From: DamienBitrise <60897705+DamienBitrise@users.noreply.github.com> Date: Fri, 19 Nov 2021 13:34:01 +0000 Subject: [PATCH 07/28] Update profile --- bitrise.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 1e5ae42..3806d58 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -51,9 +51,9 @@ app: - opts: is_expand: false BITRISE_EXPORT_METHOD: development - - opts: +- opts: is_expand: false - BITRISE_PROFILE_ID: b103a1f0-1f51-4d53-a41f-c08719676e94 + BITRISE_PROFILE_ID: e682b378-3286-41b8-aeeb-4b4398c0e025 - opts: is_expand: false BITRISE_CODE_SIGNING_IDENTITY: 'iPhone Developer: Dev Portal Bot Bitrise (E89JV3W9K4)' From 43cfcf644f74da5c0d365e246fe40fe69d2e5b8e Mon Sep 17 00:00:00 2001 From: DamienBitrise <60897705+DamienBitrise@users.noreply.github.com> Date: Fri, 19 Nov 2021 13:35:16 +0000 Subject: [PATCH 08/28] fix indentation --- bitrise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index 3806d58..5e385de 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -51,7 +51,7 @@ app: - opts: is_expand: false BITRISE_EXPORT_METHOD: development -- opts: + - opts: is_expand: false BITRISE_PROFILE_ID: e682b378-3286-41b8-aeeb-4b4398c0e025 - opts: From cf1eec27fc8f2d427bf8c89e2099111920564919 Mon Sep 17 00:00:00 2001 From: DamienBitrise <60897705+DamienBitrise@users.noreply.github.com> Date: Fri, 19 Nov 2021 13:43:46 +0000 Subject: [PATCH 09/28] Recreate user schemes --- bitrise.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bitrise.yml b/bitrise.yml index 5e385de..a0f1394 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -15,6 +15,9 @@ workflows: - git-clone@4: {} - cache-pull@2: {} - certificate-and-profile-installer@1: {} + - recreate-user-schemes@1: + inputs: + - project_path: "$BITRISE_PROJECT_PATH" - xcode-archive@3: inputs: - project_path: "$BITRISE_PROJECT_PATH" From 9ccdfb6d2c5265d75ea11051c5c829bb096133c4 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 4 Jan 2022 09:53:23 +0000 Subject: [PATCH 10/28] Add renovate.json --- renovate.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..7369fcf --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "local>bitrise-io/renovate-config" + ] +} From d60557c43110ba43e1dcfeeea70c3714804ce38f Mon Sep 17 00:00:00 2001 From: nsanjines-bitrise <98180442+nsanjines-bitrise@users.noreply.github.com> Date: Tue, 1 Feb 2022 21:55:29 -0500 Subject: [PATCH 11/28] Update README.md testing change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09e8a1d..9a0a443 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,6 @@ Simple iOS Project with working bitrise.yml included in the root of the project ## Bitrise Setup -Create a new project in Bitrise using this repo as you normally would. Use the `bitrise.yml` from the repo to define your workflows. +Create a new project in Bitrise using this repo as you normally would. Use the `bitrise.yml` from the repo to define your workflows... In order to sign the app during the `deploy` workflow archive step, you must set a valid provisioning profile and signing certificate in the `bitrise.yml` (`BITRISE_PROFILE_ID` and `BITRISE_CODE_SIGNING_IDENTITY` env vars) and upload those to your account. More details can be found in the [internal wiki](https://bitrise.atlassian.net/wiki/spaces/~833061986/pages/1554875463/Demo+App-Bitrise+Deploy+Workflow). From 5e66b946532c5048cb666acc224a304964063d9d Mon Sep 17 00:00:00 2001 From: nsanjines-bitrise <98180442+nsanjines-bitrise@users.noreply.github.com> Date: Wed, 2 Feb 2022 14:37:32 -0500 Subject: [PATCH 12/28] Update README.md asdf --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a0a443..09e8a1d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,6 @@ Simple iOS Project with working bitrise.yml included in the root of the project ## Bitrise Setup -Create a new project in Bitrise using this repo as you normally would. Use the `bitrise.yml` from the repo to define your workflows... +Create a new project in Bitrise using this repo as you normally would. Use the `bitrise.yml` from the repo to define your workflows. In order to sign the app during the `deploy` workflow archive step, you must set a valid provisioning profile and signing certificate in the `bitrise.yml` (`BITRISE_PROFILE_ID` and `BITRISE_CODE_SIGNING_IDENTITY` env vars) and upload those to your account. More details can be found in the [internal wiki](https://bitrise.atlassian.net/wiki/spaces/~833061986/pages/1554875463/Demo+App-Bitrise+Deploy+Workflow). From d38d046a45ffcb117dc6a9b64dc9986a72c8f3a8 Mon Sep 17 00:00:00 2001 From: nsanjines-bitrise <98180442+nsanjines-bitrise@users.noreply.github.com> Date: Thu, 10 Mar 2022 10:52:49 -0500 Subject: [PATCH 13/28] codesigning automatic codesigning --- .DS_Store | Bin 6148 -> 6148 bytes BitriseTest.xcodeproj/project.pbxproj | 30 +++++++++++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.DS_Store b/.DS_Store index 4f965d8eebf10c525430b4cb2d471d266d3c4c9c..a99413ad9da6a85fc599a26eef2e9c3397c9d966 100644 GIT binary patch delta 61 zcmZoMXffE}!Nk;KF!>yl-sB1<9`@-;-|vWAJv{j=lm6sgD12MS2b%?%zp+egVB5^j H@s}R}^dlJC delta 61 zcmZoMXffE}!Nk;cZSpxLy~!0!JnRe%44!8n9-4fXNq_P#6uvFvh0TJ@-&iI#ux)1N H_{$FfpR*P5 diff --git a/BitriseTest.xcodeproj/project.pbxproj b/BitriseTest.xcodeproj/project.pbxproj index 25d1745..b051929 100644 --- a/BitriseTest.xcodeproj/project.pbxproj +++ b/BitriseTest.xcodeproj/project.pbxproj @@ -417,9 +417,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; DEVELOPMENT_ASSET_PATHS = "\"BitriseTest/Preview Content\""; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 72SA8V3WYL; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = BitriseTest/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.0; @@ -440,9 +441,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; DEVELOPMENT_ASSET_PATHS = "\"BitriseTest/Preview Content\""; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 72SA8V3WYL; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = BitriseTest/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.0; @@ -463,7 +465,9 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 72SA8V3WYL; INFOPLIST_FILE = BitriseTestTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.0; @@ -487,7 +491,9 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 72SA8V3WYL; INFOPLIST_FILE = BitriseTestTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.0; @@ -510,8 +516,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = ""; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 72SA8V3WYL; INFOPLIST_FILE = BitriseTestUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -532,8 +540,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = ""; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 72SA8V3WYL; INFOPLIST_FILE = BitriseTestUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", From 4e03b7c257d9c4cafedcd7df99151975aaab0d42 Mon Sep 17 00:00:00 2001 From: nsanjines-bitrise <98180442+nsanjines-bitrise@users.noreply.github.com> Date: Fri, 18 Mar 2022 16:56:16 -0400 Subject: [PATCH 14/28] update code signing asdfs --- BitriseTest.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BitriseTest.xcodeproj/project.pbxproj b/BitriseTest.xcodeproj/project.pbxproj index b051929..1274d81 100644 --- a/BitriseTest.xcodeproj/project.pbxproj +++ b/BitriseTest.xcodeproj/project.pbxproj @@ -428,7 +428,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.bitrise.test.BitriseTest; + PRODUCT_BUNDLE_IDENTIFIER = com.bitrise.iosBitriseTest; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; @@ -452,7 +452,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.bitrise.test.BitriseTest; + PRODUCT_BUNDLE_IDENTIFIER = com.bitrise.iosBitriseTest; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; From fc6a2c15167b4bdbeb88c34616c1399dd8ba05ee Mon Sep 17 00:00:00 2001 From: Atanas Chanev Date: Tue, 7 Jun 2022 18:01:56 +0100 Subject: [PATCH 15/28] Running from repository --- bitrise.yml | 635 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 631 insertions(+), 4 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 1e5ae42..95e0de4 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -7,14 +7,332 @@ trigger_map: workflow: primary - pull_request_source_branch: "*" workflow: primary +pipelines: + save-credits: + stages: + - prepare-for-testing: {} + - test-on-firebase: {} +stages: + prepare-for-testing: + workflows: + - pipelines-prepare-for-testing: {} + test-on-firebase: + workflows: + - pipelines-firebase: {} workflows: - deploy: + android-orchestrator: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4: {} + - cache-pull@2: {} + - certificate-and-profile-installer@1: + inputs: + - install_defaults: 'no' + - xcode-build-for-test@1: + inputs: + - verbose_log: 'yes' + - deploy-to-bitrise-io@1: {} + - set-env-var@0: + inputs: + - destination_keys: ORCHESTRATOR_BUILD_SLUG + - value: "$BITRISE_BUILD_SLUG" + - build-router-start@0: + inputs: + - access_token: "$BITRISE_API_TOKEN" + - workflows: android-ui-tests-xcode + - environment_key_list: ORCHESTRATOR_BUILD_SLUG + - verbose: 'yes' + - cache-push@2: {} + meta: + bitrise.io: + stack: osx-xcode-13.3.x + machine_type_id: g2.8core + android-shard: + steps: + - script@1: + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + echo $ORCHESTRATOR_BUILD_SLUG + + curl -X 'GET' \ + "https://api.bitrise.io/v0.1/apps/$BITRISE_APP_SLUG/builds/$ORCHESTRATOR_BUILD_SLUG/artifacts" \ + -H 'accept: application/json' \ + -H "Authorization: $BITRISE_API_TOKEN" | jq -r --arg title "testbundle.zip" '.data[] | select(.title == $title).slug' | tr -d '\n' | envman add --key ARTIFACT_SLUG + + # write your script here + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + - script@1: + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + echo "The artifact slug is[$ARTIFACT_SLUG]" + + curl -X 'GET' \ + "https://api.bitrise.io/v0.1/apps/$BITRISE_APP_SLUG/builds/$ORCHESTRATOR_BUILD_SLUG/artifacts/$ARTIFACT_SLUG" \ + -H 'accept: application/json' \ + -H "Authorization: $BITRISE_API_TOKEN" | jq -r '.data.expiring_download_url' | tr -d '\n' | envman add --key ARTIFACT_URL + + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + - script@1: + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + echo $ARTIFACT_URL + + curl $ARTIFACT_URL -o testbundle.zip + + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + - script@1: + title: Modify TestBundle + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + # write your script here + curl $BITRISEIO_MODIFIED_XCRUN_URL_URL -o BitriseTest_iphoneos15.4-arm64.xctestrun + ls + mkdir testbundle + # mv BitriseTest_iphoneos15.4-arm64.xctestrun testbundle/BitriseTest_iphoneos15.4-arm64.xctestrun + touch testbundle/BitriseTest_iphoneos15.4-arm64.xctestrun + zip testbundle.zip testbundle/BitriseTest_iphoneos15.4-arm64.xctestrun + # zip -d testbundle.zip BitriseTest_iphoneos15.4-arm64.xctestrun + # unzip testbundle.zip -d testbundle + # ls testbundle + # rm testbundle.zip + # rm testbundle/BitriseTest_iphoneos15.4-arm64.xctestrun + # ls testbundle + # mv BitriseTest_iphoneos15.4-arm64.xctestrun testbundle/BitriseTest_iphoneos15.4-arm64.xctestrun + # zip -vr testbundle.zip testbundle/ -x "*.DS_Store" + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + - virtual-device-testing-for-ios@1: + inputs: + - test_devices: iphone11pro,14.7,en,portrait + - zip_path: "$BITRISE_SOURCE_DIR/testbundle.zip" + - deploy-to-bitrise-io@1: {} + meta: + bitrise.io: + stack: linux-docker-android-20.04 + machine_type_id: standard + android-ui-tests: + steps: + - script@1: + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + echo $ORCHESTRATOR_BUILD_SLUG + + curl -X 'GET' \ + "https://api.bitrise.io/v0.1/apps/$BITRISE_APP_SLUG/builds/$ORCHESTRATOR_BUILD_SLUG/artifacts" \ + -H 'accept: application/json' \ + -H "Authorization: $BITRISE_API_TOKEN" | jq -r --arg title "testbundle.zip" '.data[] | select(.title == $title).slug' | tr -d '\n' | envman add --key ARTIFACT_SLUG + + # write your script here + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + - script@1: + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + echo "The artifact slug is[$ARTIFACT_SLUG]" + + curl -X 'GET' \ + "https://api.bitrise.io/v0.1/apps/$BITRISE_APP_SLUG/builds/$ORCHESTRATOR_BUILD_SLUG/artifacts/$ARTIFACT_SLUG" \ + -H 'accept: application/json' \ + -H "Authorization: $BITRISE_API_TOKEN" | jq -r '.data.expiring_download_url' | tr -d '\n' | envman add --key ARTIFACT_URL + + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + - script@1: + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + echo $ARTIFACT_URL + + curl $ARTIFACT_URL -o testbundle.zip + + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + - virtual-device-testing-for-ios@1: + inputs: + - test_devices: ipad5,15.4,en,portrait + - test_timeout: '900' + - zip_path: "$BITRISE_SOURCE_DIR/testbundle.zip" + - deploy-to-bitrise-io@1: {} + meta: + bitrise.io: + stack: linux-docker-android-20.04 + machine_type_id: standard + android-ui-tests-xcode: + steps: + - script@1: + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + echo $ORCHESTRATOR_BUILD_SLUG + + curl -X 'GET' \ + "https://api.bitrise.io/v0.1/apps/$BITRISE_APP_SLUG/builds/$ORCHESTRATOR_BUILD_SLUG/artifacts" \ + -H 'accept: application/json' \ + -H "Authorization: $BITRISE_API_TOKEN" | jq -r --arg title "testbundle.zip" '.data[] | select(.title == $title).slug' | tr -d '\n' | envman add --key ARTIFACT_SLUG + + # write your script here + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + - script@1: + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + echo "The artifact slug is[$ARTIFACT_SLUG]" + + curl -X 'GET' \ + "https://api.bitrise.io/v0.1/apps/$BITRISE_APP_SLUG/builds/$ORCHESTRATOR_BUILD_SLUG/artifacts/$ARTIFACT_SLUG" \ + -H 'accept: application/json' \ + -H "Authorization: $BITRISE_API_TOKEN" | jq -r '.data.expiring_download_url' | tr -d '\n' | envman add --key ARTIFACT_URL + + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + - script@1: + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + echo $ARTIFACT_URL + + curl $ARTIFACT_URL -o testbundle.zip + + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + - git::https://github.com/atanas-bitrise/steps-virtual-device-testing-for-ios.git@ios15.4: + inputs: + - test_devices: ipad5,15.4,en,portrait + - test_timeout: '900' + - zip_path: "$BITRISE_SOURCE_DIR/testbundle.zip" + - deploy-to-bitrise-io@1: {} + meta: + bitrise.io: + stack: linux-docker-android-20.04 + machine_type_id: standard + benchmark_deploy: steps: - activate-ssh-key@4: run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' - git-clone@4: {} - cache-pull@2: {} - certificate-and-profile-installer@1: {} + - recreate-user-schemes@1: + inputs: + - project_path: "$BITRISE_PROJECT_PATH" - xcode-archive@3: inputs: - project_path: "$BITRISE_PROJECT_PATH" @@ -27,7 +345,11 @@ workflows: - export_method: "$BITRISE_EXPORT_METHOD" - deploy-to-bitrise-io@1: {} - cache-push@2: {} - primary: + meta: + bitrise.io: + stack: osx-xcode-12.5.x + machine_type_id: g2.8core + benchmark_test: steps: - activate-ssh-key@4: run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' @@ -40,6 +362,307 @@ workflows: - scheme: "$BITRISE_SCHEME" - deploy-to-bitrise-io@1: {} - cache-push@2: {} + meta: + bitrise.io: + stack: osx-xcode-13.2.x + machine_type_id: g2.12core + certificate-installer: + steps: + - certificate-and-profile-installer@1: + inputs: + - install_defaults: 'no' + meta: + bitrise.io: + stack: osx-xcode-13.0.x + deploy: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4: {} + - cache-pull@2: {} + - recreate-user-schemes@1: + inputs: + - project_path: "$BITRISE_SOURCE_DIR/BitriseTest.xcodeproj" + - certificate-and-profile-installer@1: + inputs: + - install_defaults: 'no' + - xcode-archive@4.2: + inputs: + - project_path: "$BITRISE_PROJECT_PATH" + - scheme: "$BITRISE_SCHEME" + - force_code_sign_identity: "$BITRISE_CODE_SIGNING_IDENTITY" + - force_provisioning_profile: "$BITRISE_PROFILE_ID" + - compile_bitcode: 'no' + - upload_bitcode: 'no' + - team_id: "$BITRISE_TEAM" + - export_method: "$BITRISE_EXPORT_METHOD" + - deploy-to-bitrise-io@1: {} + - cache-push@2: {} + meta: + bitrise.io: + stack: osx-xcode-13.2.x + machine_type_id: g2.12core + download-spm: + steps: + - script@1: + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # debug log + set -x + + # write your script here + curl https://releases.amplify.aws/aws-sdk-ios/AWSEC2-2.24.3.zip -o AWSEC2-2.24.3.zip + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + meta: + bitrise.io: + stack: osx-xcode-13.2.x + machine_type_id: g2.4core + empty: + steps: + - script@1: + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # debug log + set -x + + echo $ENV + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + firebase-deploy: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4: {} + - cache-pull@2: {} + - recreate-user-schemes@1: + inputs: + - project_path: "$BITRISE_SOURCE_DIR/BitriseTest.xcodeproj" + - certificate-and-profile-installer@1: {} + - xcode-archive@4.2: + inputs: + - project_path: "$BITRISE_PROJECT_PATH" + - scheme: "$BITRISE_SCHEME" + - force_code_sign_identity: "$BITRISE_CODE_SIGNING_IDENTITY" + - force_provisioning_profile: "$BITRISE_PROFILE_ID" + - compile_bitcode: 'no' + - upload_bitcode: 'no' + - team_id: "$BITRISE_TEAM" + - export_method: "$BITRISE_EXPORT_METHOD" + - firebase-app-distribution@0: + inputs: + - app: 1:729822476188:ios:70b0808e590217c154fa59 + - release_notes: '' + - testers: '' + - upgrade_firebase_tools: 'true' + - firebase_token: "$FIREBASE_TOKEN" + - cache-push@2: {} + meta: + bitrise.io: + stack: osx-xcode-13.2.x + machine_type_id: g2.4core + gen2-primary: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4: {} + - cache-pull@2: {} + - certificate-and-profile-installer@1: {} + - xcode-test@2: + inputs: + - project_path: "$BITRISE_PROJECT_PATH" + - scheme: "$BITRISE_SCHEME" + - deploy-to-bitrise-io@1: {} + - cache-push@2: {} + meta: + bitrise.io: + stack: osx-xcode-13.0.x + list-tests: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@6.1: {} + - xcode-test@4.1: + inputs: + - project_path: "$BITRISE_PROJECT_PATH" + - simulator_device: iPhone 13 Pro + - xcodebuild_test_options: "-parallel-testing-enabled YES -parallel-testing-worker-count + 4" + - verbose: 'yes' + - destination: platform=iOS Simulator,name=Atanas-Device,OS=15.4 + - verbose_log: 'yes' + - collect_simulator_diagnostics: on_failure + - xcodebuild_options: "-parallel-testing-enabled YES -parallel-testing-worker-count + 4" + - scheme: "$BITRISE_SCHEME" + - deploy-to-bitrise-io@2.0: {} + meta: + bitrise.io: + stack: osx-xcode-13.2.x + machine_type_id: g2.8core + pipelines-cli: + steps: + - script@1: + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + # write your script here + curl https://app.bitrise.io/app/$APP_SLUG/build/start.json --data "{\"hook_info\":{\"type\":\"bitrise\",\"build_trigger_token\":\"$BUILD_TRIGGER_TOKEN\"},\"build_params\":{\"branch\":\"master\",\"pipeline_id\":\"save-credits\"},\"triggered_by\":\"curl\"}" + + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + pipelines-firebase: + steps: + - git::https://github.com/bitrise-steplib/bitrise-step-artifact-pull.git@main: + title: Pull artifacts + inputs: + - verbose: true + - artifact_sources: prepare-for-testing.* + - script@1: + inputs: + - is_debug: 'yes' + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + # write your script here + echo $BITRISE_ARTIFACT_PATHS + echo ${BITRISE_ARTIFACT_PATHS##*|} + + envman add --key ARTIFACT_PATH --value ${BITRISE_ARTIFACT_PATHS##*|} + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + title: Print artifact paths + - virtual-device-testing-for-ios@1: + inputs: + - test_timeout: '900' + - zip_path: "$ARTIFACT_PATH" + - deploy-to-bitrise-io@1: {} + meta: + bitrise.io: + stack: linux-docker-android-20.04 + machine_type_id: standard + pipelines-prepare-for-testing: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@6.1: {} + - cache-pull@2: {} + - certificate-and-profile-installer@1: + inputs: + - install_defaults: 'no' + - xcode-build-for-test@1: + inputs: + - verbose_log: 'yes' + - deploy-to-bitrise-io@1: {} + - cache-push@2: {} + meta: + bitrise.io: + stack: osx-xcode-13.1.x + machine_type_id: g2.12core + primary: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@6.1: {} + - cache-pull@2: {} + - certificate-and-profile-installer@1: + inputs: + - install_defaults: 'no' + - xcode-test@4.1: + inputs: + - project_path: "$BITRISE_PROJECT_PATH" + - simulator_device: iPhone 13 Pro + - xcodebuild_test_options: "-parallel-testing-enabled YES -parallel-testing-worker-count + 4" + - verbose: 'yes' + - destination: platform=iOS Simulator,name=iPhone 13 Pro,OS=latest + - verbose_log: 'yes' + - collect_simulator_diagnostics: on_failure + - xcodebuild_options: "-parallel-testing-enabled YES -parallel-testing-worker-count + 4" + - maximum_test_repetitions: '0' + - log_formatter: xcodebuild + - scheme: "$BITRISE_SCHEME" + - deploy-to-bitrise-io@2.0: {} + - cache-push@2: {} + meta: + bitrise.io: + stack: osx-xcode-13.3.x + machine_type_id: g2.4core + primary-ui-tests: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4: {} + - cache-pull@2: {} + - certificate-and-profile-installer@1: + inputs: + - install_defaults: 'no' + - xcode-build-for-test@1: + inputs: + - verbose_log: 'yes' + - virtual-device-testing-for-ios@1: {} + - deploy-to-bitrise-io@1: {} + - cache-push@2: {} + meta: + bitrise.io: + stack: osx-xcode-13.2.x + machine_type_id: g2.4core + which-code: + steps: + - script@1: + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + # write your script here + xcodebuild -version + + # or run a script from your repository, like: + # bash ./path/to/script.sh + # not just bash, e.g.: + # ruby ./path/to/script.rb + meta: + bitrise.io: + stack: osx-xcode-13.3.x + machine_type_id: g2.12core app: envs: - opts: @@ -53,10 +676,14 @@ app: BITRISE_EXPORT_METHOD: development - opts: is_expand: false - BITRISE_PROFILE_ID: b103a1f0-1f51-4d53-a41f-c08719676e94 + BITRISE_PROFILE_ID: a043c226-0b15-4780-814a-14a0313360c9 - opts: is_expand: false - BITRISE_CODE_SIGNING_IDENTITY: 'iPhone Developer: Dev Portal Bot Bitrise (E89JV3W9K4)' + BITRISE_CODE_SIGNING_IDENTITY: iPhone Developer - opts: is_expand: false BITRISE_TEAM: 72SA8V3WYL +meta: + bitrise.io: + stack: osx-xcode-13.2.x + machine_type_id: g2.8core From 12c30446b283f1dba609d3fad290c67d9efd3aad Mon Sep 17 00:00:00 2001 From: nsanjines-bitrise <98180442+nsanjines-bitrise@users.noreply.github.com> Date: Tue, 2 Aug 2022 13:46:30 -0500 Subject: [PATCH 16/28] Create github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/github-actions-demo.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..75be101 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,17 @@ +name: GitHub Actions Demo +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." From 6188e2d24ecd28fde472a1a4038869671be8d710 Mon Sep 17 00:00:00 2001 From: nsanjines-bitrise <98180442+nsanjines-bitrise@users.noreply.github.com> Date: Tue, 2 Aug 2022 13:53:35 -0500 Subject: [PATCH 17/28] Update github-actions-demo.yml update action to trigger bitrise --- .github/workflows/github-actions-demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 75be101..7b79775 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🐧 This job is now running on a MacOS server hosted by Bitrise!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v3 From cb57ab6de324ef83b9727f4bae4786ff4bfd5d92 Mon Sep 17 00:00:00 2001 From: nsanjines-bitrise <98180442+nsanjines-bitrise@users.noreply.github.com> Date: Tue, 2 Aug 2022 14:22:33 -0500 Subject: [PATCH 18/28] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 09e8a1d..15ca0ad 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,4 @@ Simple iOS Project with working bitrise.yml included in the root of the project Create a new project in Bitrise using this repo as you normally would. Use the `bitrise.yml` from the repo to define your workflows. In order to sign the app during the `deploy` workflow archive step, you must set a valid provisioning profile and signing certificate in the `bitrise.yml` (`BITRISE_PROFILE_ID` and `BITRISE_CODE_SIGNING_IDENTITY` env vars) and upload those to your account. More details can be found in the [internal wiki](https://bitrise.atlassian.net/wiki/spaces/~833061986/pages/1554875463/Demo+App-Bitrise+Deploy+Workflow). +asdf From 74c1e969ad8c0305c49c2927495656c8979bc12f Mon Sep 17 00:00:00 2001 From: nsanjines-bitrise <98180442+nsanjines-bitrise@users.noreply.github.com> Date: Tue, 2 Aug 2022 14:23:45 -0500 Subject: [PATCH 19/28] adsf asdf --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 15ca0ad..c3db9d5 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,4 @@ Create a new project in Bitrise using this repo as you normally would. Use the ` In order to sign the app during the `deploy` workflow archive step, you must set a valid provisioning profile and signing certificate in the `bitrise.yml` (`BITRISE_PROFILE_ID` and `BITRISE_CODE_SIGNING_IDENTITY` env vars) and upload those to your account. More details can be found in the [internal wiki](https://bitrise.atlassian.net/wiki/spaces/~833061986/pages/1554875463/Demo+App-Bitrise+Deploy+Workflow). asdf +asdf From d72d9f81a52b1a180fa4eeb92b0ff718c7835427 Mon Sep 17 00:00:00 2001 From: DamienBitrise <60897705+DamienBitrise@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:39:09 -0700 Subject: [PATCH 20/28] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index c3db9d5..09e8a1d 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,3 @@ Simple iOS Project with working bitrise.yml included in the root of the project Create a new project in Bitrise using this repo as you normally would. Use the `bitrise.yml` from the repo to define your workflows. In order to sign the app during the `deploy` workflow archive step, you must set a valid provisioning profile and signing certificate in the `bitrise.yml` (`BITRISE_PROFILE_ID` and `BITRISE_CODE_SIGNING_IDENTITY` env vars) and upload those to your account. More details can be found in the [internal wiki](https://bitrise.atlassian.net/wiki/spaces/~833061986/pages/1554875463/Demo+App-Bitrise+Deploy+Workflow). -asdf -asdf From f8d9e11fbf7cbda4200aac5a30a82d492c6c4b20 Mon Sep 17 00:00:00 2001 From: Atanas Chanev Date: Mon, 13 Jan 2025 15:18:02 +0000 Subject: [PATCH 21/28] Create a merge conflict --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 09e8a1d..7c901eb 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Simple iOS Project with working bitrise.yml included in the root of the project ## Bitrise Setup +Create a merge conflict. + Create a new project in Bitrise using this repo as you normally would. Use the `bitrise.yml` from the repo to define your workflows. In order to sign the app during the `deploy` workflow archive step, you must set a valid provisioning profile and signing certificate in the `bitrise.yml` (`BITRISE_PROFILE_ID` and `BITRISE_CODE_SIGNING_IDENTITY` env vars) and upload those to your account. More details can be found in the [internal wiki](https://bitrise.atlassian.net/wiki/spaces/~833061986/pages/1554875463/Demo+App-Bitrise+Deploy+Workflow). From 7937b239f9c91f888686c22cf971cad9c3bb5a7e Mon Sep 17 00:00:00 2001 From: atanas-bitrise <84032001+atanas-bitrise@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:10:58 +0100 Subject: [PATCH 22/28] Create ios.yml --- .github/workflows/ios.yml | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ios.yml diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml new file mode 100644 index 0000000..634a777 --- /dev/null +++ b/.github/workflows/ios.yml @@ -0,0 +1,44 @@ +name: iOS starter workflow + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + name: Build and Test default scheme using any available iPhone simulator + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set Default Scheme + run: | + scheme_list=$(xcodebuild -list -json | tr -d "\n") + default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") + echo $default | cat >default + echo Using default scheme: $default + - name: Build + env: + scheme: ${{ 'default' }} + platform: ${{ 'iOS Simulator' }} + run: | + # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) + device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" + - name: Test + env: + scheme: ${{ 'default' }} + platform: ${{ 'iOS Simulator' }} + run: | + # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) + device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` + if [ $scheme = default ]; then scheme=$(cat default); fi + if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi + file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` + xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" From 3b78e036f4ec733d3c04242b6a4b77d9b5393f1c Mon Sep 17 00:00:00 2001 From: atanas-bitrise <84032001+atanas-bitrise@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:20:36 +0100 Subject: [PATCH 23/28] Update ios.yml --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 634a777..3295a86 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Build and Test default scheme using any available iPhone simulator - runs-on: macos-latest + runs-on: self-hosted steps: - name: Checkout From ed6d4209d40f791cb1f4732359003d7811c239d1 Mon Sep 17 00:00:00 2001 From: atanas-bitrise <84032001+atanas-bitrise@users.noreply.github.com> Date: Wed, 25 Feb 2026 17:41:26 +0000 Subject: [PATCH 24/28] Update ios.yml Use agent pool --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 3295a86..b8deb1e 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Build and Test default scheme using any available iPhone simulator - runs-on: self-hosted + runs-on: agent-pool-3e592397-7edb-49e2-a16a-3cc3ef4cd13f steps: - name: Checkout From 710d07a9cd1e6c5c97717fd548adae7a78ac1b5f Mon Sep 17 00:00:00 2001 From: atanas-bitrise <84032001+atanas-bitrise@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:11:01 +0000 Subject: [PATCH 25/28] Update ios.yml --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index b8deb1e..5046557 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Build and Test default scheme using any available iPhone simulator - runs-on: agent-pool-3e592397-7edb-49e2-a16a-3cc3ef4cd13f + runs-on: vm-pool-g2-mac-m4pro-7c-27g-0003b57-913009cb-c720 steps: - name: Checkout From 4720a6f793e862b2f9c944615b7adffdd0ecea49 Mon Sep 17 00:00:00 2001 From: atanas-bitrise <84032001+atanas-bitrise@users.noreply.github.com> Date: Thu, 26 Feb 2026 10:16:06 +0000 Subject: [PATCH 26/28] Update runner group --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 5046557..7a5e73b 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Build and Test default scheme using any available iPhone simulator - runs-on: vm-pool-g2-mac-m4pro-7c-27g-0003b57-913009cb-c720 + runs-on: feb steps: - name: Checkout From 4937a92266dcecd35129fd59cac2c2a87563277a Mon Sep 17 00:00:00 2001 From: atanas-bitrise <84032001+atanas-bitrise@users.noreply.github.com> Date: Thu, 26 Feb 2026 10:26:49 +0000 Subject: [PATCH 27/28] No runner group --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 7a5e73b..affe36c 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Build and Test default scheme using any available iPhone simulator - runs-on: feb + runs-on: vm-pool-g2-mac-m4pro-7c-27g-44f682c-214a6c00-d86e steps: - name: Checkout From 7b454b0f3dc34c52975debe472fac59befdf29dd Mon Sep 17 00:00:00 2001 From: atanas-bitrise <84032001+atanas-bitrise@users.noreply.github.com> Date: Thu, 26 Feb 2026 10:34:41 +0000 Subject: [PATCH 28/28] Self hosted --- .github/workflows/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index affe36c..3295a86 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Build and Test default scheme using any available iPhone simulator - runs-on: vm-pool-g2-mac-m4pro-7c-27g-44f682c-214a6c00-d86e + runs-on: self-hosted steps: - name: Checkout