Skip to content

Commit 871e803

Browse files
authored
Merge pull request stephencelis#568 from stephencelis/carthage-tests
Carthage tests
2 parents ceaec3e + 845ad5a commit 871e803

File tree

12 files changed

+33
-5
lines changed

12 files changed

+33
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DerivedData
2020
*.xcuserstate
2121

2222
# Carthage
23-
Carthage
23+
/Carthage/
2424

2525
# Swift Package Manager
2626
.build

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@ 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"
17+
- env: CARTHAGE_PLATFORM="watchOS"
18+
- env: CARTHAGE_PLATFORM="tvOS"
1519
- env: PACKAGE_MANAGER_COMMAND="test -Xlinker -lsqlite3"
1620
before_install:
1721
- gem update bundler
1822
- gem install xcpretty --no-document
23+
- brew update
24+
- brew outdated carthage || brew upgrade carthage
1925
script:
2026
- ./run-tests.sh

Package.swift

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

Tests/Carthage/.gitignore

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

Tests/Carthage/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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)
11+
12+
Cartfile:
13+
echo 'git "$(TRAVIS_BUILD_DIR)" "HEAD"' > $@
14+
15+
clean:
16+
@rm -f Cartfile Cartfile.resolved
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

CocoaPodsTests/integration_test.rb renamed to Tests/CocoaPods/integration_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ def validator
3434
end
3535

3636
def podspec
37-
File.expand_path(File.dirname(__FILE__) + '/../SQLite.swift.podspec')
37+
File.expand_path(File.dirname(__FILE__) + '/../../SQLite.swift.podspec')
3838
end
3939

4040
def project_test_dir
41-
File.expand_path(File.dirname(__FILE__) + '/../Tests/SQLiteTests')
41+
File.expand_path(File.dirname(__FILE__) + '/../SQLiteTests')
4242
end
4343
end

0 commit comments

Comments
 (0)