Skip to content

Commit 4066660

Browse files
committed
Add tests for Carthage
1 parent 98be859 commit 4066660

File tree

6 files changed

+18
-1
lines changed

6 files changed

+18
-1
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ matrix:
1212
- env: VALIDATOR_SUBSPEC="standard"
1313
- env: VALIDATOR_SUBSPEC="standalone"
1414
- env: VALIDATOR_SUBSPEC="SQLCipher"
15+
- env: CARTHAGE_PLATFORM="iOS"
16+
- env: CARTHAGE_PLATFORM="Mac"
1517
- env: PACKAGE_MANAGER_COMMAND="test -Xlinker -lsqlite3"
1618
before_install:
1719
- gem update bundler

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ let package = Package(
1313
dependencies: [
1414
.Package(url: "https://github.com/jberkel/CSQLite.git", majorVersion: 0)
1515
],
16-
exclude: ["Tests/CocoaPods"]
16+
exclude: ["Tests/CocoaPods", "Tests/Carthage"]
1717
)

Tests/Carthage/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Carthage/
2+
Cartfile.resolved

Tests/Carthage/Cartfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github "stephencelis/SQLite.swift" "master"

Tests/Carthage/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CARTHAGE := /usr/local/bin/carthage
2+
CARTHAGE_PLATFORM := iOS
3+
CARTHAGE_CONFIGURATION := Release
4+
CARTHAGE_DIR := Carthage
5+
CARTHAGE_ARGS := --no-use-binaries
6+
CARTHAGE_TOOLCHAIN := com.apple.dt.toolchain.Swift_3_0
7+
CARTHAGE_CMDLINE := --configuration $(CARTHAGE_CONFIGURATION) --platform $(CARTHAGE_PLATFORM) --toolchain $(CARTHAGE_TOOLCHAIN) $(CARTHAGE_ARGS)
8+
9+
test: $(CARTHAGE) Cartfile
10+
$< bootstrap $(CARTHAGE_CMDLINE)

run-tests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ if [ -n "$BUILD_SCHEME" ]; then
88
fi
99
elif [ -n "$VALIDATOR_SUBSPEC" ]; then
1010
cd Tests/CocoaPods && make test
11+
elif [ -n "$CARTHAGE_PLATFORM" ]; then
12+
cd Tests/Carthage && make test CARTHAGE_PLATFORM="$CARTHAGE_PLATFORM"
1113
elif [ -n "${PACKAGE_MANAGER_COMMAND}" ]; then
1214
swift ${PACKAGE_MANAGER_COMMAND}
1315
fi

0 commit comments

Comments
 (0)