From b1518944a732138f5ed2eafc69fe794143a4af62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Wed, 21 Sep 2016 14:09:27 -0700 Subject: [PATCH] [ios, macos] Rewrote CI scripts Broke up the iOS and macOS Bitrise scripts into several steps each for more granular progress and failure reporting and to take advantage of better error reporting in the built-in Bitrise steps. Added a step to deploy Xcode test results and (in the event of a failure) raw xcodebuild output to Bitrise.io, with a handy link from the Bitrise UI. --- platform/ios/bitrise.yml | 28 ++++++++++++++++++++++------ platform/macos/bitrise.yml | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/platform/ios/bitrise.yml b/platform/ios/bitrise.yml index d610869cb..d8a9a4fcd 100644 --- a/platform/ios/bitrise.yml +++ b/platform/ios/bitrise.yml @@ -23,7 +23,7 @@ workflows: envman add --key SKIPCI --value false fi - script: - title: Run build + title: Install Dependencies run_if: '{{enveq "SKIPCI" "false"}}' inputs: - content: |- @@ -32,12 +32,28 @@ workflows: brew install cmake brew tap mapbox/homebrew-ios-sim-3 brew install mapbox/homebrew-ios-sim-3/ios-sim - gem install xcpretty --no-rdoc --no-ri - gem install jazzy --no-rdoc --no-ri - export BUILDTYPE=Debug - make ios - make ios-test - is_debug: 'yes' + - script: + title: Generate Workspace + run_if: '{{enveq "SKIPCI" "false"}}' + inputs: + - content: |- + #!/bin/bash + set -eu -o pipefail + export BUILDTYPE=Debug + make iproj + - is_debug: 'yes' + - xcode-test: + title: Run SDK Unit Tests + run_if: '{{enveq "SKIPCI" "false"}}' + inputs: + - project_path: platform/ios/ios.xcworkspace + - scheme: CI + - deploy-to-bitrise-io: + title: Deploy to Bitrise.io + run_if: '{{enveq "SKIPCI" "false"}}' + inputs: + - notify_user_groups: none - slack: title: Post to Slack run_if: '{{enveq "SKIPCI" "false"}}' diff --git a/platform/macos/bitrise.yml b/platform/macos/bitrise.yml index 3cfc9b7a5..f1226f884 100644 --- a/platform/macos/bitrise.yml +++ b/platform/macos/bitrise.yml @@ -23,7 +23,7 @@ workflows: envman add --key SKIPCI --value false fi - script: - title: Run build script + title: Install Dependencies run_if: '{{enveq "SKIPCI" "false"}}' inputs: - content: |- @@ -31,11 +31,43 @@ workflows: set -eu -o pipefail brew install cmake gem install xcpretty --no-rdoc --no-ri + - is_debug: 'yes' + - script: + title: Generate Workspace + run_if: '{{enveq "SKIPCI" "false"}}' + inputs: + - content: |- + #!/bin/bash + set -eu -o pipefail + export BUILDTYPE=Debug + make xproj + - is_debug: 'yes' + - script: + title: Run Core Tests + run_if: '{{enveq "SKIPCI" "false"}}' + inputs: + - content: |- + #!/bin/bash + set -eu -o pipefail export BUILDTYPE=Debug - make macos make test + - is_debug: 'yes' + - script: + title: Run SDK Unit Tests + run_if: '{{enveq "SKIPCI" "false"}}' + inputs: + - content: |- + #!/bin/bash + set -eu -o pipefail + export BUILDTYPE=Debug + export XCPRETTY="| tee ${BITRISE_DEPLOY_DIR}/raw-xcodebuild-output.txt | xcpretty --color --report html --output ${BITRISE_DEPLOY_DIR}/xcode-test-results.html" make macos-test - is_debug: 'yes' + - deploy-to-bitrise-io: + title: Deploy to Bitrise.io + run_if: '{{enveq "SKIPCI" "false"}}' + inputs: + - notify_user_groups: none - slack: title: Post to Slack run_if: '{{enveq "SKIPCI" "false"}}'