mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-24 01:38:26 +00:00
Summary: Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1428 We kept getting an error as the following: ``` - ERROR | [OSX] unknown: Encountered an unknown error (The platform of the target `App` (macOS 10.11) is not compatible with `IGListSwiftKit (4.1.0)`, which does not support `macOS`.) during validation. ``` Looks like IGListSwiftKit did not support macos, wondering why this is the case here. Potentially this error was introduced in this PR: https://github.com/Instagram/IGListKit/pull/1388 cc natestedman who might know the context here The solution here is to lint the specs separately in travis, so that for IGListSwiftKit we only lint against ios and tvos. And the other podspecs will still lint against on all platform, including the macos. Reviewed By: natestedman Differential Revision: D20036436 fbshipit-source-id: 5406cef1825fc4c157fee9ca5856ace81df0508d
136 lines
5 KiB
YAML
136 lines
5 KiB
YAML
language: objective-c
|
|
osx_image: xcode10.2
|
|
gemfile: Gemfile
|
|
addons:
|
|
homebrew:
|
|
packages:
|
|
- swiftlint
|
|
update: true
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- stable
|
|
- travis-stages
|
|
|
|
cache:
|
|
- cocoapods
|
|
- bundler
|
|
- $HOME/Library/Caches/Homebrew
|
|
|
|
env:
|
|
global:
|
|
- LANG=en_US.UTF-8
|
|
|
|
- IOS_SCHEME="IGListKit"
|
|
|
|
- IOS_SDK=iphonesimulator12.2
|
|
- MACOS_SDK=macosx10.14
|
|
- TVOS_SDK=appletvsimulator12.2
|
|
|
|
- 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"
|
|
|
|
# iOS Destinations
|
|
- IOS_DESTINATION_9="OS=9.3,name=iPad Air 2"
|
|
- IOS_DESTINATION_10="OS=10.3.1,name=iPhone 7"
|
|
- IOS_DESTINATION_11="OS=11.3,name=iPhone X"
|
|
- IOS_DESTINATION_12="OS=12.2,name=iPhone Xʀ"
|
|
|
|
# macOS Destinations
|
|
- MACOS_DESTINATION="arch=x86_64"
|
|
|
|
# tvOS Destinations
|
|
- TVOS_DESTINATION_10="OS=10.2,name=Apple TV 1080p"
|
|
- TVOS_DESTINATION_11="OS=11.3,name=Apple TV 4K"
|
|
- TVOS_DESTINATION_12="OS=12.2,name=Apple TV 4K"
|
|
|
|
before_install:
|
|
# Bundler 2.0
|
|
- gem update --system
|
|
- gem install bundler
|
|
|
|
jobs:
|
|
include:
|
|
- stage: pod lint
|
|
name: Cocoapods Lint
|
|
# We need to pass all of the podspecs here so that Cocoapods uses the local version,
|
|
# rather than searching the specs repository for the other specs in the repo.
|
|
script:
|
|
- bundle exec pod lib lint IGListDiffKit.podspec --allow-warnings
|
|
- bundle exec pod lib lint IGListKit.podspec --allow-warnings "--include-podspecs=IGListDiffKit.podspec"
|
|
- bundle exec pod lib lint IGListSwiftKit.podspec --allow-warnings "--include-podspecs=*.podspec"
|
|
|
|
# Build example projects
|
|
- &build-examples
|
|
stage: build examples
|
|
name: "iOS 12.2"
|
|
env: DESTINATION="$IOS_DESTINATION_12" WORKSPACE="$IOS_EXAMPLE_WORKSPACE" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
|
|
script:
|
|
- set -o pipefail
|
|
- xcodebuild -version -sdk
|
|
- xcodebuild build -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
|
|
|
|
- <<: *build-examples
|
|
name: "iOS 11.3"
|
|
env: DESTINATION="$IOS_DESTINATION_11" WORKSPACE="$IOS_EXAMPLE_WORKSPACE" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
|
|
|
|
- <<: *build-examples
|
|
name: "iOS 10.3.1"
|
|
env: DESTINATION="$IOS_DESTINATION_10" WORKSPACE="$IOS_EXAMPLE_WORKSPACE" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
|
|
|
|
- <<: *build-examples
|
|
name: "iOS 9.3"
|
|
env: DESTINATION="$IOS_DESTINATION_9" WORKSPACE="$IOS_EXAMPLE_WORKSPACE" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
|
|
|
|
- <<: *build-examples
|
|
name: "macOS 10.13"
|
|
env: DESTINATION="$MACOS_DESTINATION" WORKSPACE="$MACOS_EXAMPLE_WORKSPACE" SDK="$MACOS_SDK" SCHEME="$EXAMPLE_SCHEME"
|
|
|
|
- <<: *build-examples
|
|
name: "tvOS 12.3"
|
|
env: DESTINATION="$TVOS_DESTINATION_12" WORKSPACE="$TVOS_EXAMPLE_WORKSPACE" SDK="$TVOS_SDK" SCHEME="$EXAMPLE_SCHEME"
|
|
|
|
- <<: *build-examples
|
|
name: "tvOS 11.3"
|
|
env: DESTINATION="$TVOS_DESTINATION_11" WORKSPACE="$TVOS_EXAMPLE_WORKSPACE" SDK="$TVOS_SDK" SCHEME="$EXAMPLE_SCHEME"
|
|
|
|
- <<: *build-examples
|
|
name: "tvOS 10.3"
|
|
env: DESTINATION="$TVOS_DESTINATION_10" WORKSPACE="$TVOS_EXAMPLE_WORKSPACE" SDK="$TVOS_SDK" SCHEME="$EXAMPLE_SCHEME"
|
|
|
|
# UI Tests
|
|
- stage: tests
|
|
name: "UI Tests: iOS 12.2"
|
|
env: DESTINATION="$IOS_DESTINATION_12" WORKSPACE="$IOS_EXAMPLE_WORKSPACE" SDK="$IOS_SDK" SCHEME="$EXAMPLE_SCHEME"
|
|
script:
|
|
- set -o pipefail
|
|
- xcodebuild build test -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
|
|
|
|
# Unit Tests
|
|
- &unit-tests
|
|
stage: tests
|
|
name: "Tests: iOS 12.2"
|
|
env: DESTINATION="$IOS_DESTINATION_12" WORKSPACE="IGListKit.xcworkspace" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
|
|
script:
|
|
- set -o pipefail
|
|
- 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;
|
|
after_success:
|
|
- bundle exec slather
|
|
|
|
- <<: *unit-tests
|
|
name: "Tests: iOS 11.3"
|
|
env: DESTINATION="$IOS_DESTINATION_11" WORKSPACE="IGListKit.xcworkspace" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
|
|
|
|
# Danger
|
|
- stage: Danger
|
|
script: bundle exec danger --verbose
|
|
|
|
stages:
|
|
- pod lint
|
|
- build examples
|
|
- tests
|
|
- danger
|