IGListKit/.travis.yml
Sho Ikeda 9315299fbc Minimum fixes for Xcode 9.3 build errors
Summary:
Issue fixed: #1141

This is a set of minimum fixes for Xcode 9.3 rather than #1142. Much smaller diffs 😃

The changes here were done by Xcode's FixIt. See also https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265-SW5.

> Platform Dependencies
>
> OS X uses several data types—NSInteger, NSUInteger,CGFloat, and CFIndex—to provide a consistent means of representing values in 32- and 64-bit environments. In a 32-bit environment, NSInteger and NSUInteger are defined as int and unsigned int, respectively. In 64-bit environments, NSInteger and NSUInteger are defined as long and unsigned long, respectively. To avoid the need to use different printf-style type specifiers depending on the platform, you can use the specifiers shown in Table 3. Note that in some cases you may have to cast the value.

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/1143

Differential Revision: D7551617

Pulled By: rnystrom

fbshipit-source-id: b27ebe2b1a1c93ebfd1218dc38b7621fefee2e6b
2018-04-09 08:37:18 -07:00

89 lines
3.9 KiB
YAML

language: objective-c
osx_image: xcode9.3beta
gemfile: Gemfile
branches:
only:
- master
- stable
cache:
- cocoapods
- bundler
env:
global:
- LANG=en_US.UTF-8
- WORKSPACE="IGListKit.xcworkspace"
- IOS_SCHEME="IGListKit"
- TVOS_SCHEME="IGListKit-tvOS"
- MACOS_SCHEME="IGListKit-macOS"
- IOS_SDK=iphonesimulator11.3
- MACOS_SDK=macosx10.13
- TVOS_SDK=appletvsimulator11.3
- IOS_EXAMPLE_WORKSPACE="Examples/Examples-iOS/IGListKitExamples.xcworkspace"
- TVOS_EXAMPLE_WORKSPACE="Examples/Examples-tvOS/IGListKitExamples.xcworkspace"
- MACOS_EXAMPLE_WORKSPACE="Examples/Examples-macOS/IGListKitExamples.xcworkspace"
- EXAMPLE_SCHEME="IGListKitExamples"
matrix:
- DESTINATION="OS=9.3,name=iPad Air 2" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=10.3.1,name=iPhone 7" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=11.3,name=iPhone X" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=10.2,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=11.3,name=Apple TV 4K" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="arch=x86_64" SDK="$MACOS_SDK" SCHEME="$MACOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
before_install:
# - gem install cocoapods --no-rdoc --no-ri --no-document --quiet
# - gem install bundler --no-rdoc --no-ri --no-document --quiet
# - bundle install
- brew update
- brew outdated swiftlint || brew upgrade swiftlint
script:
- set -o pipefail
- xcodebuild -version -sdk
- if [ $POD_LINT == "YES" ]; then
bundle exec pod lib lint;
fi
- if [ $BUILD_EXAMPLE == "YES" ] && [ $SDK == $IOS_SDK ]; then
xcodebuild build -workspace "$IOS_EXAMPLE_WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
fi
- if [ $RUN_UI_TESTS == "YES" ] && [ $SDK == $IOS_SDK ]; then
xcodebuild build test -workspace "$IOS_EXAMPLE_WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
fi
- if [ $BUILD_EXAMPLE == "YES" ] && [ $SDK == $TVOS_SDK ]; then
xcodebuild build -workspace "$TVOS_EXAMPLE_WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
fi
- if [ $BUILD_EXAMPLE == "YES" ] && [ $SDK == $MACOS_SDK ]; then
xcodebuild build -workspace "$MACOS_EXAMPLE_WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
fi
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild build build-for-testing -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c;
xcodebuild analyze test-without-building -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c;
else
xcodebuild build analyze -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
fi
- bundle exec danger
after_success:
- bundle exec slather