From 9eff356a61173637fee6152cafc1f7fa82425c2a Mon Sep 17 00:00:00 2001 From: Nadine Salter Date: Fri, 20 Mar 2015 15:13:45 -0700 Subject: [PATCH 1/3] [travis] Shared schemes for all example projects. --- .../xcshareddata/xcschemes/Sample.xcscheme | 88 +++++++++++++++++++ .../xcshareddata/xcschemes/Sample.xcscheme | 88 +++++++++++++++++++ .../xcshareddata/xcschemes/Sample.xcscheme | 88 +++++++++++++++++++ .../xcshareddata/xcschemes/Sample.xcscheme | 88 +++++++++++++++++++ .../xcshareddata/xcschemes/Sample.xcscheme | 88 +++++++++++++++++++ .../xcshareddata/xcschemes/Sample.xcscheme | 88 +++++++++++++++++++ 6 files changed, 528 insertions(+) create mode 100644 examples/ASCollectionView/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme create mode 100644 examples/EditableText/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme create mode 100644 examples/Kittens/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme create mode 100644 examples/Multiplex/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme create mode 100644 examples/Placeholders/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme create mode 100644 examples/Swift/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme diff --git a/examples/ASCollectionView/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/ASCollectionView/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme new file mode 100644 index 0000000000..f49edc75d6 --- /dev/null +++ b/examples/ASCollectionView/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/EditableText/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/EditableText/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme new file mode 100644 index 0000000000..1e14aa0329 --- /dev/null +++ b/examples/EditableText/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/Kittens/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/Kittens/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme new file mode 100644 index 0000000000..1e14aa0329 --- /dev/null +++ b/examples/Kittens/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/Multiplex/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/Multiplex/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme new file mode 100644 index 0000000000..1e14aa0329 --- /dev/null +++ b/examples/Multiplex/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/Placeholders/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/Placeholders/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme new file mode 100644 index 0000000000..1e14aa0329 --- /dev/null +++ b/examples/Placeholders/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/Swift/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/Swift/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme new file mode 100644 index 0000000000..8d7f73e325 --- /dev/null +++ b/examples/Swift/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From a9d555d225a134372799aacd758ace97ed15db0b Mon Sep 17 00:00:00 2001 From: Nadine Salter Date: Fri, 20 Mar 2015 15:11:36 -0700 Subject: [PATCH 2/3] [travis] New build script. In addition to building & testing AsyncDisplayKit, this new build script can ensure that all example projects still compile. This will prevent breaking API changes from landing without updating sample projects that use them. It's also extensible, so we can add additional integration tests in future (e.g., non-CocoaPods framework integration). --- .travis.yml | 5 +++-- build.sh | 57 ++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 53 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e3b53f735..e419d88849 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,9 @@ before_install: - gem update cocoapods - xcrun simctl list env: - - TEST_OS=8.1 -script: ./build.sh $TEST_OS + - MODE=tests + - MODE=examples +script: ./build.sh $MODE # whitelist branches: diff --git a/build.sh b/build.sh index 5ad98e744d..eb524b1036 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,50 @@ -#!/bin/sh -xctool \ - -workspace AsyncDisplayKit.xcworkspace \ - -scheme AsyncDisplayKit \ - -sdk iphonesimulator8.1 \ - -destination "platform=iOS Simulator,OS=${1},name=iPhone 5" \ - build test +#!/bin/bash + +# **** Update me when new Xcode versions are released! **** +PLATFORM="platform=iOS Simulator,OS=8.1,name=iPhone 6" +SDK="iphonesimulator8.1" + + +# It is pitch black. +set -e +function trap_handler() { + echo -e "\n\nOh no! You walked directly into the slavering fangs of a lurking grue!" + echo "**** You have died ****" + exit 255 +} +trap trap_handler INT TERM EXIT + + +MODE="$1" + +if [ "$MODE" = "tests" ]; then + echo "Building & testing AsyncDisplayKit." + pod install + xctool \ + -workspace AsyncDisplayKit.xcworkspace \ + -scheme AsyncDisplayKit \ + -sdk "$SDK" \ + -destination "$PLATFORM" \ + build test + trap - EXIT + exit 0 +fi + +if [ "$MODE" = "examples" ]; then + echo "Verifying that all AsyncDisplayKit examples compile." + + for example in examples/*/; do + echo "Building $example." + pod install --project-directory=$example + xctool \ + -workspace "${example}Sample.xcworkspace" \ + -scheme Sample \ + -sdk "$SDK" \ + -destination "$PLATFORM" \ + build + done + trap - EXIT + exit 0 +fi + +echo "Unrecognised mode '$MODE'." From 65fe805ecb3a57851b4a7aaa5900273bb0270c9b Mon Sep 17 00:00:00 2001 From: Nadine Salter Date: Fri, 20 Mar 2015 15:55:29 -0700 Subject: [PATCH 3/3] [travis] Disable Travis CI automatic pod install. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e419d88849..7f43c40559 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ before_install: - brew reinstall xctool - gem update cocoapods - xcrun simctl list +install: echo "<3" env: - MODE=tests - MODE=examples