-
Notifications
You must be signed in to change notification settings - Fork 1
/
bitrise.yml
217 lines (186 loc) · 6.43 KB
/
bitrise.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
format_version: 8
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- APM_COLLECTOR_TOKEN: 951fc805-5bb3-4a36-9c5b-7443b51d7067 #dummy token
- ORIGINAL_WORK_DIR: $BITRISE_SOURCE_DIR
workflows:
test:
after_run:
- _prepare
- test_project_simple
- test_workflow_objc
- test_workflow_swift
- test_project_custom_workspace
ci:
after_run:
- _prepare
- test_project_simple
- test_workflow_objc
- test_workflow_swift
- test_project_custom_workspace
audit-this-step:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
stepman audit --step-yml ./step.yml
share-this-step:
envs:
- MY_STEPLIB_REPO_FORK_GIT_URL: https://github.com/shams-ahmed/bitrise-steplib.git
- STEP_ID_IN_STEPLIB: add-trace-sdk
- STEP_GIT_VERION_TAG_TO_SHARE: 1.2.4
- STEP_GIT_CLONE_URL: https://github.com/bitrise-steplib/bitrise-step-add-trace-sdk.git
before_run:
- audit-this-step
steps:
- script:
inputs:
- content: |-
#!/bin/bash
bitrise share start -c ${MY_STEPLIB_REPO_FORK_GIT_URL}
bitrise share create --stepid ${STEP_ID_IN_STEPLIB} --tag ${STEP_GIT_VERION_TAG_TO_SHARE} --git ${STEP_GIT_CLONE_URL}
bitrise share finish
test_project_simple:
envs:
- TEST_REPO: https://github.com/bitrise-io/iOS-Sample.git
- BITRISE_PROJECT_PATH: "$ORIGINAL_WORK_DIR/_tmp/iOS-Sample/iOS Sample.xcodeproj"
- BITRISE_SCHEME: "iOS Sample"
after_run:
- _common
- _test_project_pod
- _test_project_build
test_project_badPath:
envs:
- TEST_REPO: https://github.com/bitrise-io/iOS-Sample.git
- BITRISE_PROJECT_PATH: "./Users/shamsahmed/bitrise-step-link-apm-sdk-ios/_tmp/iOS-Sample/iOS Sample.xcodeproj"
- BITRISE_SCHEME: "iOS Sample"
after_run:
- _common
test_project_custom_workspace:
envs:
- TEST_REPO: https://github.com/bitrise-io/iOS-Sample-Custom_Workspace.git
- BITRISE_PROJECT_PATH: "$ORIGINAL_WORK_DIR/_tmp/iOS-Sample-Custom_Workspace/Music.xcworkspace"
- BITRISE_SCHEME: "YouSeeEnt"
after_run:
- _common
test_workflow_swift:
envs:
- TEST_REPO: https://github.com/bitrise-io/sample-apps-ios-workspace-swift.git
- BITRISE_PROJECT_PATH: "$ORIGINAL_WORK_DIR/_tmp/sample-apps-ios-workspace-swift/sample-apps-ios-workspace-swift.xcworkspace"
- BITRISE_SCHEME: "sample-apps-ios-workspace-swift"
after_run:
- _common
- _test_workflow_swift_pod
- _test_workflow_swift_build
test_workflow_objc:
envs:
- TEST_REPO: https://github.com/bitrise-io/sample-apps-ios-simple-objc.git
- BITRISE_PROJECT_PATH: "$ORIGINAL_WORK_DIR/_tmp/sample-apps-ios-simple-objc/ios-simple-objc/ios-simple-objc.xcodeproj"
- BITRISE_SCHEME: "ios-simple-objc"
after_run:
- _common
- _test_workflow_objc_build
_prepare:
steps:
- script:
run_if: .IsCI
title: Install the Gem.lock's bundler version.
inputs:
- content: |-
#!/usr/bin/env bash
gem install bundler --force
gem update --system
bundle update --bundler
- script:
title: Run rspec tests
inputs:
- content: |-
#!/usr/bin/env bash
bundle exec rspec
_test_workflow_swift_pod:
steps:
- script:
title: Pod install setup
inputs:
- content: |-
#!/usr/bin/env bash
cd $ORIGINAL_WORK_DIR/_tmp/sample-apps-ios-workspace-swift/
pod install
_test_project_pod:
steps:
- script:
title: Pod install setup
inputs:
- content: |-
#!/usr/bin/env bash
cd $ORIGINAL_WORK_DIR/_tmp/iOS-Sample/
pod install
_test_workflow_swift_build:
steps:
- script:
title: Building Xcode project
inputs:
- content: |-
#!/usr/bin/env bash
cd $ORIGINAL_WORK_DIR/_tmp/sample-apps-ios-workspace-swift/
xcodebuild build clean -workspace sample-apps-ios-workspace-swift.xcworkspace -scheme sample-apps-ios-workspace-swift -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO" | xcpretty
_test_workflow_objc_build:
steps:
- script:
title: Building Xcode project
inputs:
- content: |-
#!/usr/bin/env bash
cd $ORIGINAL_WORK_DIR/_tmp/sample-apps-ios-simple-objc/ios-simple-objc
xcodebuild build clean -project ios-simple-objc.xcodeproj -scheme ios-simple-objc -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO" | xcpretty
_test_project_build:
steps:
- script:
title: Building Xcode project
inputs:
- content: |-
#!/usr/bin/env bash
cd $ORIGINAL_WORK_DIR/_tmp/iOS-Sample/
xcodebuild build clean -workspace "iOS Sample.xcworkspace" -scheme "iOS Sample" -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO" | xcpretty
_common:
steps:
- script:
title: Cleanup _tmp dir
inputs:
- content: |-
#!/usr/bin/env bash
cd $ORIGINAL_WORK_DIR
rm -rf "_tmp"
mkdir "_tmp"
- change-workdir:
title: Switch working dir to _tmp
inputs:
- path: $ORIGINAL_WORK_DIR/_tmp
- is_create_path: "false"
- script:
title: Git clone iOS sample app
inputs:
- content: |-
#!/usr/bin/env bash
git clone $TEST_REPO
- path::./:
title: Run step
description: |
The step first downloads the libTrace.a static library, then links it to the provided iOS project.
The step works by modifying the project.pbxproj descriptor to include necessary flags and
variables for linking.
inputs:
- lib_version: "latest"
- script:
title: Run blackbox tests
inputs:
- content: |-
#!/usr/bin/env bash
ruby ./../step_test.rb "$BITRISE_PROJECT_PATH"
title: Zip & export the modified iOS project
inputs:
- source_path: $BITRISE_PROJECT_PATH
- destination: $BITRISE_DEPLOY_DIR