diff --git a/.travis.yml b/.travis.yml index 2e3b53f735..7f43c40559 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,11 @@ before_install: - brew reinstall xctool - gem update cocoapods - xcrun simctl list +install: echo "<3" 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'." 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +