Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
Add Swift Package Manager support
Browse files Browse the repository at this point in the history
  • Loading branch information
inamiy committed Jan 8, 2017
1 parent eb6b6ff commit faf2b1f
Show file tree
Hide file tree
Showing 15 changed files with 74 additions and 19 deletions.
10 changes: 10 additions & 0 deletions .Package.test.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import PackageDescription

let package = Package(
name: "RxAutomaton",
dependencies: [
.Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 3),
.Package(url: "https://github.com/Quick/Quick", majorVersion: 1),
.Package(url: "https://github.com/Quick/Nimble", majorVersion: 5, minor: 1)
]
)
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
Packages/
.build/

# CocoaPods
Expand All @@ -54,7 +52,7 @@ Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
Expand Down
37 changes: 27 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ env:
- LC_CTYPE=en_US.UTF-8
- XCPROJ="-workspace RxAutomaton.xcworkspace -scheme RxAutomaton"

osx_image: xcode8.2

matrix:
include:
- os: osx
osx_image: xcode8
language: objective-c
script:
- set -o pipefail
Expand All @@ -15,16 +16,14 @@ matrix:
- JOB=xcodebuild-macOS

- os: osx
osx_image: xcode8
language: objective-c
script:
- set -o pipefail
- xcodebuild build-for-testing test-without-building -destination 'platform=iOS Simulator,name=iPhone 6s' ENABLE_TESTABILITY=YES $XCPROJ | xcpretty
- xcodebuild build-for-testing test-without-building -destination 'platform=iOS Simulator,name=iPhone 6s,OS=9.0' ENABLE_TESTABILITY=YES $XCPROJ | xcpretty
env:
- JOB=xcodebuild-iOS

- os: osx
osx_image: xcode8
language: objective-c
script:
- set -o pipefail
Expand All @@ -33,16 +32,34 @@ matrix:
- JOB=xcodebuild-tvOS

- os: osx
osx_image: xcode8
language: objective-c
script:
- set -o pipefail
- xcodebuild build -destination 'platform=watchOS Simulator,name=Apple Watch - 38mm' $XCPROJ | xcpretty
env:
- JOB=xcodebuild-watchOS

# - os: osx
# osx_image: xcode8
# script:
# - pod lib lint --allow-warnings
# env: JOB=pod-lint
- os: osx
script:
- pod repo update --silent
- pod lib lint --allow-warnings
env: JOB=pod-lint

- os: osx
language: generic
script:
- swift build
env:
- JOB=swiftpm-mac

- os: linux
language: generic
sudo: required
dist: trusty
before_install:
- eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"
script:
- mv .Package.test.swift Package.swift
- swift build
- swift test
env: JOB=swiftpm-linux
8 changes: 8 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import PackageDescription

let package = Package(
name: "RxAutomaton",
dependencies: [
.Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 3)
]
)
19 changes: 14 additions & 5 deletions RxAutomaton.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@

/* Begin PBXFileReference section */
1FA0AC451DE8AC2B007F01E0 /* StateFuncMappingSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StateFuncMappingSpec.swift; sourceTree = "<group>"; };
1FB0B5251E226FA800052073 /* LinuxMain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = "<group>"; };
1FCAB4CC1DC7845200EA6EBF /* RxCocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RxCocoa.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1FCAB4CE1DC7845700EA6EBF /* Pulsator.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Pulsator.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1FCAB4E21DC7947400EA6EBF /* RxTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RxTest.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -151,6 +152,15 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
1FB0B5241E226FA800052073 /* Tests */ = {
isa = PBXGroup;
children = (
1FB0B5251E226FA800052073 /* LinuxMain.swift */,
488738EA1D61689100BF70F4 /* RxAutomatonTests */,
);
path = Tests;
sourceTree = "<group>";
};
4822CC3E1D61969C00783A77 /* Fixtures */ = {
isa = PBXGroup;
children = (
Expand All @@ -165,7 +175,7 @@
children = (
488743011D61927700BF70F4 /* Configurations */,
488738DE1D61689000BF70F4 /* RxAutomaton */,
488738EA1D61689100BF70F4 /* RxAutomatonTests */,
1FB0B5241E226FA800052073 /* Tests */,
48AC076B1D61C962000293FD /* RxAutomatonDemo */,
48873F441D616A0800BF70F4 /* Frameworks */,
488738DD1D61689000BF70F4 /* Products */,
Expand Down Expand Up @@ -209,8 +219,7 @@
4822CC331D6194FD00783A77 /* TerminatingSpec.swift */,
488738ED1D61689100BF70F4 /* Info.plist */,
);
name = RxAutomatonTests;
path = Tests;
path = RxAutomatonTests;
sourceTree = "<group>";
};
48873F441D616A0800BF70F4 /* Frameworks */ = {
Expand Down Expand Up @@ -636,7 +645,7 @@
baseConfigurationReference = 4887411A1D61923300BF70F4 /* UniversalFramework_Test.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = Tests/Info.plist;
INFOPLIST_FILE = Tests/RxAutomatonTests/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.inamiy.RxAutomatonTests;
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand All @@ -647,7 +656,7 @@
baseConfigurationReference = 4887411A1D61923300BF70F4 /* UniversalFramework_Test.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = Tests/Info.plist;
INFOPLIST_FILE = Tests/RxAutomatonTests/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.inamiy.RxAutomatonTests;
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand Down
13 changes: 13 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import XCTest
import Quick

@testable import RxAutomatonTests

Quick.QCKMain([
MappingSpec.self,
NextMappingSpec.self,
AnyMappingSpec.self,
StateFuncMappingSpec.self,
NextMappingLatestSpec.self,
TerminatingSpec.self
])
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit faf2b1f

Please sign in to comment.