-
Notifications
You must be signed in to change notification settings - Fork 1
Configure CI via Buildkite #6
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
Changes from all commits
7d045fd
16d4e0d
ef19a80
2c8ff49
2bebe59
a0680cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/bin/bash -eu | ||
|
|
||
| # Notice that: | ||
| # | ||
| # - We are using raw `xcodebuild` without extra tooling such as Fastlane, | ||
| # `xcpretty`, or `xcbeautify`. This is an intentional compromise to keep the | ||
| # setup lean, as adding any of those would require extras in CI such as | ||
| # chating for what, right now, looks like merely a log readability gain. | ||
| # | ||
| # - The iOS Simulator version is hardcoded in the command call, unlike the | ||
| # Simulator device, so we have a single source of truth. The downside is that | ||
| # the syntax in the pipeline is less clear: a reader might as where's the | ||
| # iOS version set. As long as we only need to test against the latest iOS | ||
| # version, that seems like a reasonable tradeoff to make it easier to move to | ||
| # newer versions as they are released. | ||
| SIMULATOR_NAME=$1 | ||
|
|
||
| xcodebuild clean test \ | ||
| -project 'ScreenObject.xcodeproj' \ | ||
| -scheme 'ScreenObject' \ | ||
| -destination "platform=iOS Simulator,name=$SIMULATOR_NAME,OS=14.5" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| env: | ||
| IMAGE_ID: xcode-12.5.1 | ||
| agents: | ||
| queue: 'mac' | ||
|
Comment on lines
+1
to
+4
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jkmassel @AliSoftware TIL that Buildkite offers a native way to specify default I haven't tested this, but I expect that if we define a default There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the pipeline level default and agree it makes sense to use it. But unlike you my guess would be that any step-specific env would completely override the default. Otherwise there wouldn't be a way to undefine FOO in some steps… so in any case definitively worth checking the behavior in such a case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mokagio Huh, actually this might not behave like either of us expect, as according to the BuildKite documentation, the
Which is a strange choice from them imho, and iiuc means that we wouldn't be able to provide e.g. a different
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 I'm guessing that's a typo in the docs. I run a test and the results is inline with my expectation.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I opened a PR in their docs to suggest an update. This option works fine for this pipeline, but we should wait to see what Buildkite replies in terms of what the expected behavior is before considering updating our other pipelines. |
||
|
|
||
| steps: | ||
| - label: "🧪 Build and Test (iPhone 12 Simulator)" | ||
| command: .buildkite/commands/run-tests.sh 'iPhone 12' | ||
|
|
||
| - label: "🧪 Build and Test (iPad Pro (12.9-inch) (5th generation) Simulator)" | ||
| command: .buildkite/commands/run-tests.sh 'iPad Pro (12.9-inch) (5th generation)' | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to:
xcprettyorxcbeautifyto format the output. All of those options would require extra dependency and CI setup that doesn't seem granted at this time$SIMULATOR_NAME.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same feedback as in the companion XCUITestHelpers PR here