Skip to content

Commit

Permalink
Test SwiftPM with Travis (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl authored Dec 28, 2018
1 parent 1ba73a0 commit 4782eba
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
35 changes: 33 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ branches:
- master
stages:
- lint
- carthage
- compile
- test
jobs:
include:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
23 changes: 23 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -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]

0 comments on commit 4782eba

Please sign in to comment.