-
Notifications
You must be signed in to change notification settings - Fork 232
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
Add Multiple Platform CI #242
Changes from 11 commits
d0caa98
8e91f7f
48e3a21
acd5ba8
96c8917
c604898
888b77c
7089fb7
9b1beb1
51d517d
7e8a674
500c448
224c64a
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 |
---|---|---|
@@ -1,18 +1,16 @@ | ||
version: 2 | ||
jobs: | ||
build-and-test: | ||
build-and-test-iOS-swift-4.2: | ||
macos: | ||
xcode: "10.0.0" | ||
environment: | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
BUNDLE_PATH: ~/.gems | ||
|
||
steps: | ||
- checkout | ||
- run: | | ||
- run: | | ||
brew install swiftlint | ||
bundle install --without=developments | ||
bundle install --without=development | ||
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g' | ||
- run: | ||
name: Bootstrap | ||
|
@@ -24,20 +22,127 @@ jobs: | |
SCHEME: Auth0.iOS | ||
DEVICE: iPhone 8 | ||
FASTLANE_EXPLICIT_OPEN_SIMULATOR: 2 | ||
- run: | ||
name: Pod Lib Lint | ||
command: bundle exec fastlane ios pod_lint | ||
- run: | | ||
bash <(curl -s https://codecov.io/bash) -J 'Auth0' | ||
bash <(curl -s https://codecov.io/bash) -J 'Auth0' | ||
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. Should we also upload the coverage for the rest of the build variants? Why do you need to pass the package name? 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've ran into issues in the past with multiple codecov, I don't think it understands what to do with it for example. MacOS doesn't have WebAuth so if that report is sent after the iOS one codecov will report lots of missing codecov. |
||
- save_cache: | ||
key: dependency-cache | ||
paths: | ||
- Carthage/Build | ||
- store_test_results: | ||
path: fastlane/test_output | ||
build-and-test-iOS-swift-4.0: | ||
macos: | ||
xcode: "10.0.0" | ||
environment: | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
steps: | ||
- checkout | ||
- run: | | ||
brew install swiftlint | ||
bundle install --without=development | ||
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g' | ||
sed -i "" 's/SWIFT_VERSION = 4.2/SWIFT_VERSION = 4.0/g' "Auth0.xcodeproj/project.pbxproj" | ||
- run: | ||
name: Bootstrap | ||
command: bundle exec fastlane ios bootstrap | ||
- run: | ||
name: Run test suite | ||
command: bundle exec fastlane ios ci | ||
environment: | ||
SCHEME: Auth0.iOS | ||
DEVICE: iPhone 8 | ||
FASTLANE_EXPLICIT_OPEN_SIMULATOR: 2 | ||
- save_cache: | ||
key: dependency-cache | ||
paths: | ||
- Carthage/Build | ||
build-and-test-iOS-swift-3.0: | ||
macos: | ||
xcode: "9.4.1" | ||
environment: | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
steps: | ||
- checkout | ||
- run: | | ||
brew install swiftlint | ||
sudo gem install bundler | ||
bundle install --without=development | ||
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g' | ||
sed -i "" 's/SWIFT_VERSION = 4.2/SWIFT_VERSION = 3.3/g' "Auth0.xcodeproj/project.pbxproj" | ||
- run: | ||
name: Bootstrap | ||
command: bundle exec fastlane ios bootstrap | ||
- run: | ||
name: Run test suite | ||
command: bundle exec fastlane ios ci | ||
environment: | ||
SCHEME: Auth0.iOS | ||
DEVICE: iPhone 8 | ||
FASTLANE_EXPLICIT_OPEN_SIMULATOR: 2 | ||
- save_cache: | ||
key: dependency-cache | ||
paths: | ||
- Carthage/Build | ||
build-and-test-macOS-swift-4.2: | ||
macos: | ||
xcode: "10.0.0" | ||
environment: | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
steps: | ||
- checkout | ||
- run: | | ||
brew install swiftlint | ||
bundle install --without=development | ||
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g' | ||
- run: | ||
name: Bootstrap | ||
command: carthage bootstrap --platform mac | ||
- run: | ||
name: Setup Keychain | ||
command: | | ||
security create-keychain -p circle cikeychain | ||
security list-keychains -d user -s "/Users/distiller/Library/Keychains/xcode.keychain-db" /Users/distiller/Library/Keychains/cikeychain-db | ||
security default-keychain -s /Users/distiller/Library/Keychains/cikeychain-db | ||
security unlock-keychain -p circle "/Users/distiller/Library/Keychains/cikeychain-db" | ||
- run: | ||
name: Run test suite | ||
command: xcodebuild test -scheme Auth0.macOS -destination 'platform=macOS,arch=x86_64' | xcpretty | ||
- save_cache: | ||
key: dependency-cache | ||
paths: | ||
- Carthage/Build | ||
build-and-test-tvOS-swift-4.2: | ||
macos: | ||
xcode: "10.0.0" | ||
environment: | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
steps: | ||
- checkout | ||
- run: | | ||
brew install swiftlint | ||
bundle install --without=development | ||
grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g' | ||
- run: | ||
name: Bootstrap | ||
command: carthage bootstrap --platform tvOS | ||
- run: | ||
name: Run test suite | ||
command: xcodebuild test -scheme Auth0.tvOS -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty | ||
- save_cache: | ||
key: dependency-cache | ||
paths: | ||
- Carthage/Build | ||
|
||
workflows: | ||
version: 2 | ||
build-test-report: | ||
build-test: | ||
jobs: | ||
- build-and-test | ||
- build-and-test-iOS-swift-4.2 | ||
- build-and-test-iOS-swift-4.0 | ||
- build-and-test-iOS-swift-3.0 | ||
- build-and-test-macOS-swift-4.2 | ||
- build-and-test-tvOS-swift-4.2 |
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'd rename it to something shorter. They are all builds running tests.
iOS-swift-4.2-build
build-iOS-swift-4.2
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.
Will think about it 😉