-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from PromiseKit/ci-pod-lib-lint
Do `pod lib lint` for each Xcode
- Loading branch information
Showing
7 changed files
with
178 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,125 @@ | ||
matrix: | ||
branches: | ||
only: | ||
- master | ||
stages: | ||
- lint | ||
- compile | ||
- test | ||
jobs: | ||
include: | ||
- {osx_image: xcode8.3, env: 'SWFT=3.1 PLAT=iOS DST="OS=10.3.1,name=iPhone SE"', os: osx, language: objective-c} | ||
- {osx_image: xcode8.3, env: 'SWFT=3.1 PLAT=tvOS DST="OS=10.2,name=Apple TV 1080p"', os: osx, language: objective-c} | ||
- {osx_image: xcode8.3, env: 'SWFT=3.1 PLAT=macOS DST="arch=x86_64"', os: osx, language: objective-c} | ||
- {osx_image: xcode8.3, env: 'SWFT=3.1 PLAT=watchOS DST="OS=3.2,name=Apple Watch - 38mm"', os: osx, language: objective-c} | ||
- &pod | ||
stage: lint | ||
osx_image: xcode8.3 | ||
env: SWIFT=3.1 | ||
name: pod lib lint --swift-version=3.1 | ||
os: osx | ||
language: objective-c | ||
before_install: | ||
gem install cocoapods --prerelease --version 1.6.0.beta.1 | ||
install: | ||
carthage bootstrap --no-build PromiseKit | ||
script: | | ||
cd Carthage/Checkouts/PromiseKit | ||
mv .github/PromiseKit.podspec . | ||
rm -rf Extensions/Foundation/Sources | ||
cp -R ../../../Sources Extensions/Foundation | ||
pod lib lint --subspec=PromiseKit/Foundation --fail-fast --swift-version=$SWIFT | ||
- <<: *pod | ||
osx_image: xcode9.2 | ||
env: SWIFT=3.2 | ||
name: pod lib lint --swift-version=3.2 | ||
- <<: *pod | ||
osx_image: xcode9.4 | ||
env: SWIFT=3.3 | ||
name: pod lib lint --swift-version=3.3 | ||
- <<: *pod | ||
osx_image: xcode10 | ||
env: SWIFT=3.4 | ||
name: pod lib lint --swift-version=3.4 | ||
- <<: *pod | ||
osx_image: xcode9.2 | ||
env: SWIFT=4.0 | ||
name: pod lib lint --swift-version=4.0 | ||
- <<: *pod | ||
osx_image: xcode9.4 | ||
env: SWIFT=4.1 | ||
name: pod lib lint --swift-version=4.1 | ||
- <<: *pod | ||
osx_image: xcode10 | ||
env: SWIFT=4.2 | ||
name: pod lib lint --swift-version=4.2 | ||
|
||
- {osx_image: xcode9.2, env: 'SWFT=3.2 PLAT=iOS DST="OS=11.2,name=iPhone SE"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.2, env: 'SWFT=3.2 PLAT=tvOS DST="OS=11.2,name=Apple TV"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.2, env: 'SWFT=3.2 PLAT=macOS DST="arch=x86_64"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.2, env: 'SWFT=3.2 PLAT=watchOS DST="OS=4.2,name=Apple Watch - 38mm"', os: osx, language: objective-c} | ||
- &linux | ||
stage: compile | ||
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.0 | ||
# ^^ we have some source-conditionals for this version | ||
name: Linux / Swift 3.2.0 | ||
os: linux | ||
dist: trusty | ||
sudo: required | ||
language: generic | ||
before_install: | ||
eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" | ||
script: | ||
swift build -Xswiftc -swift-version -Xswiftc $SWIFT_BUILD_VERSION | ||
- <<: *linux | ||
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.0.3 | ||
name: Linux / Swift 3.2.3 | ||
- <<: *linux | ||
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.1.2 | ||
name: Linux / Swift 3.3 | ||
- <<: *linux | ||
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.2 | ||
name: Linux / Swift 3.4 | ||
- <<: *linux | ||
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.0 | ||
name: Linux / Swift 4.0.0 | ||
# ^^ we have some source-conditionals for this version | ||
- <<: *linux | ||
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.0.3 | ||
name: Linux / Swift 4.0.3 | ||
- <<: *linux | ||
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.1.2 | ||
name: Linux / Swift 4.1 | ||
- <<: *linux | ||
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.2 | ||
name: Linux / Swift 4.2 | ||
|
||
- {osx_image: xcode9.4, env: 'SWFT=3.3 PLAT=iOS DST="OS=11.4,name=iPhone 5s"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.4, env: 'SWFT=3.3 PLAT=tvOS DST="OS=11.4,name=Apple TV"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.3, env: 'SWFT=3.3 PLAT=macOS DST="arch=x86_64"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.3, env: 'SWFT=3.3 PLAT=watchOS DST="OS=4.3,name=Apple Watch - 38mm"', os: osx, language: objective-c} | ||
- &swiftpm | ||
stage: compile | ||
name: Xcode 8.3 / SwiftPM | ||
os: osx | ||
osx_image: xcode8.3 | ||
language: objective-c | ||
script: swift build | ||
- <<: *swiftpm | ||
name: Xcode 9.4 / SwiftPM | ||
osx_image: xcode9.4 | ||
- <<: *swiftpm | ||
name: Xcode 10.0 / SwiftPM | ||
osx_image: xcode10 | ||
|
||
- {osx_image: xcode10, env: 'SWFT=3.4 PLAT=iOS DST="OS=12.0,name=iPhone SE"', os: osx, language: objective-c} | ||
- {osx_image: xcode10, env: 'SWFT=3.4 PLAT=tvOS DST="OS=12.0,name=Apple TV"', os: osx, language: objective-c} | ||
- {osx_image: xcode10, env: 'SWFT=3.4 PLAT=macOS DST="arch=x86_64"', os: osx, language: objective-c} | ||
- {osx_image: xcode10, env: 'SWFT=3.4 PLAT=watchOS DST="OS=5.0,name=Apple Watch Series 3 - 42mm"', os: osx, language: objective-c} | ||
|
||
- {osx_image: xcode9.2, env: 'SWFT=4.0 PLAT=iOS DST="OS=11.2,name=iPhone SE"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.2, env: 'SWFT=4.0 PLAT=tvOS DST="OS=11.2,name=Apple TV"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.2, env: 'SWFT=4.0 PLAT=macOS DST="arch=x86_64"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.2, env: 'SWFT=4.0 PLAT=watchOS DST="OS=4.2,name=Apple Watch - 38mm"', os: osx, language: objective-c} | ||
|
||
- {osx_image: xcode9.4, env: 'SWFT=4.1 PLAT=macOS DST="arch=x86_64" TEST=1', os: osx, language: objective-c} | ||
- {osx_image: xcode9.4, env: 'SWFT=4.1 PLAT=iOS DST="OS=8.4,name=iPhone 4s"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.4, env: 'SWFT=4.1 PLAT=iOS DST="OS=9.3,name=iPhone 5s"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.4, env: 'SWFT=4.1 PLAT=iOS DST="OS=10.3.1,name=iPhone SE"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.4, env: 'SWFT=4.1 PLAT=iOS DST="OS=11.4,name=iPhone 5s" TEST=1', os: osx, language: objective-c} | ||
- {osx_image: xcode9.3, env: 'SWFT=4.1 PLAT=tvOS DST="OS=9.2,name=Apple TV 1080p"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.3, env: 'SWFT=4.1 PLAT=tvOS DST="OS=10.2,name=Apple TV 1080p"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.4, env: 'SWFT=4.1 PLAT=tvOS DST="OS=11.4,name=Apple TV" TEST=1', os: osx, language: objective-c} | ||
- {osx_image: xcode9.3, env: 'SWFT=4.1 PLAT=watchOS DST="OS=2.2,name=Apple Watch - 38mm"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.3, env: 'SWFT=4.1 PLAT=watchOS DST="OS=3.2,name=Apple Watch - 38mm"', os: osx, language: objective-c} | ||
- {osx_image: xcode9.4, env: 'SWFT=4.1 PLAT=watchOS DST="OS=4.3,name=Apple Watch - 38mm"', os: osx, language: objective-c} | ||
|
||
- {osx_image: xcode10, env: 'SWFT=4.3 PLAT=iOS DST="OS=12.0,name=iPhone SE"', os: osx, language: objective-c} | ||
- {osx_image: xcode10, env: 'SWFT=4.3 PLAT=tvOS DST="OS=12.0,name=Apple TV"', os: osx, language: objective-c} | ||
- {osx_image: xcode10, env: 'SWFT=4.3 PLAT=macOS DST="arch=x86_64"', os: osx, language: objective-c} | ||
- {osx_image: xcode10, env: 'SWFT=4.3 PLAT=watchOS DST="OS=5.0,name=Apple Watch Series 3 - 42mm"', os: osx, language: objective-c} | ||
|
||
# Swift 3.2.0 (we have some source-conditionals for this version) | ||
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.0'} | ||
# Swift 3.2.3 | ||
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.0.3'} | ||
# Swift 3.3 | ||
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.1.2 TEST=1'} | ||
# Swift 3.4 | ||
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=3 SWIFT_VERSION=DEVELOPMENT-SNAPSHOT-2018-06-20-a TEST=1'} | ||
# Swift 4.0.0 (we have some source-conditionals for this version) | ||
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.0'} | ||
# Swift 4.0.3 | ||
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.0.3'} | ||
# Swift 4.1 | ||
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.1.2 TEST=1'} | ||
# Swift 4.2 | ||
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=DEVELOPMENT-SNAPSHOT-2018-06-20-a TEST=1'} | ||
|
||
cache: | ||
directories: | ||
- Carthage | ||
before_install: | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then | ||
carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT --verbose; | ||
else | ||
eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"; | ||
swift --version; | ||
fi | ||
install: | ||
- case $PLAT in | ||
macOS|tvOS|iOS|watchOS) | ||
xcodebuild -scheme PMKFoundation -target PMKFoundation -quiet -destination "$DST" SWIFT_VERSION=$SWFT SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build; | ||
if [[ $TEST == "1" ]]; then | ||
xcodebuild -scheme PMKFoundation -target PMKNSTests -quiet -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build; | ||
fi;; | ||
*) | ||
swift build -Xswiftc -swift-version -Xswiftc $SWIFT_BUILD_VERSION;; | ||
esac | ||
script: | ||
- case $PLAT in | ||
macOS|tvOS|iOS) | ||
if [[ $TEST == "1" ]]; then | ||
xcodebuild -scheme PMKFoundation -destination "$DST" test -enableCodeCoverage YES; | ||
fi;; | ||
*) | ||
;; | ||
esac | ||
after_success: | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then | ||
bash <(curl -s https://codecov.io/bash); | ||
fi | ||
- &test | ||
stage: test | ||
osx_image: xcode10 | ||
name: macOS Tests | ||
env: DST='arch=x86_64' PLAT=macOS | ||
os: osx | ||
language: objective-c | ||
cache: | ||
directories: | ||
- Carthage | ||
before_install: | ||
carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT | ||
install: | ||
xcodebuild -scheme PMKFoundation -target PMKFoundation -quiet -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build | ||
script: | ||
xcodebuild -scheme PMKFoundation -quiet -destination "$DST" test | ||
after_success: | ||
bash <(curl -s https://codecov.io/bash); | ||
- <<: *test | ||
env: DST='OS=12.0,name=iPhone SE' PLAT=iOS | ||
name: iOS Tests | ||
- <<: *test | ||
env: DST='OS=12.0,name=Apple TV' PLAT=tvOS | ||
name: tvOS Tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
github "AliSoftware/OHHTTPStubs" "6.1.0" | ||
github "mxcl/PromiseKit" "6.3.4" | ||
github "mxcl/PromiseKit" "6.5.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "PromiseKit", | ||
"repositoryURL": "https://github.com/mxcl/PromiseKit.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "9e5bc43281cae89ab0b6e47df3ea25a2c44af7f0", | ||
"version": "6.5.0" | ||
} | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// swift-tools-version:4.2 | ||
|
||
import PackageDescription | ||
|
||
let pkg = Package(name: "PMKFoundation") | ||
pkg.products = [ | ||
.library(name: "PMKFoundation", targets: ["PMKFoundation"]), | ||
] | ||
pkg.dependencies = [ | ||
.package(url: "https://github.com/mxcl/PromiseKit.git", .upToNextMajor(from: "6.0.0")) | ||
] | ||
pkg.swiftLanguageVersions = [.v3, .v4, .v4_2] | ||
|
||
let target: Target = .target(name: "PMKFoundation") | ||
target.path = "Sources" | ||
target.exclude = ["NSNotificationCenter", "NSTask", "NSURLSession"].flatMap { | ||
["\($0)+AnyPromise.m", "\($0)+AnyPromise.h"] | ||
} | ||
target.exclude.append("PMKFoundation.h") | ||
|
||
target.dependencies = [ | ||
"PromiseKit" | ||
] | ||
|
||
#if os(Linux) | ||
target.exclude += [ | ||
"afterlife.swift", | ||
"NSObject+Promise.swift" | ||
] | ||
#endif | ||
|
||
pkg.targets = [target] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters