diff --git a/.travis.yml b/.travis.yml index 13e7e96..d320b34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ branches: - master stages: - lint - - carthage + - compile - test jobs: include: @@ -53,7 +53,7 @@ jobs: env: SWIFT=4.2 name: pod lib lint --swift-version=4.2 - - stage: carthage + - stage: compile osx_image: xcode10 name: Carthage / watchOS os: osx @@ -64,6 +64,37 @@ jobs: directories: - Carthage +# Alamofire does not yet support Linux + # - &linux + # stage: compile + # env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.0.3 + # name: Linux / Swift 3.2.3 + # 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=4 SWIFT_VERSION=4.2.1 + # name: Linux / Swift 4.2.1 + + - &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.1 / SwiftPM + osx_image: xcode10 + - &test stage: test osx_image: xcode10 diff --git a/Package@swift-4.2.swift b/Package@swift-4.2.swift new file mode 100644 index 0000000..d6ab721 --- /dev/null +++ b/Package@swift-4.2.swift @@ -0,0 +1,23 @@ +// swift-tools-version:4.2 + +import PackageDescription + +let pkg = Package(name: "PMKAlamofire") +pkg.products = [ + .library(name: "PMKAlamofire", targets: ["PMKAlamofire"]), +] +pkg.dependencies = [ + .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "4.0.0")), + .package(url: "https://github.com/mxcl/PromiseKit.git", .upToNextMajor(from: "6.0.0")) +] +pkg.swiftLanguageVersions = [.v3, .v4, .v4_2] + +let target: Target = .target(name: "PMKAlamofire") +target.path = "Sources" +target.exclude = ["Tests"] +target.dependencies = [ + "PromiseKit", + "Alamofire" +] + +pkg.targets = [target]