Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Commit 62322e7

Browse files
author
Hugo Tunius
committed
[Travis] Explicit swift versions
1 parent 7dfe2d4 commit 62322e7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ script:
66
matrix:
77
include:
88
- osx_image: xcode10
9-
env: BUILD_SDK=iphonesimulator12.0 DESTINATION="platform=iOS Simulator,name=iPhone 8"
9+
env: SWIFT=4.2 BUILD_SDK=iphonesimulator12.0 DESTINATION="platform=iOS Simulator,name=iPhone 8"
10+
- osx_image: xcode9.2
11+
env: SWIFT=4.0 BUILD_SDK=iphonesimulator11.2 DESTINATION="platform=iOS Simulator,name=iPhone 8"
1012
- osx_image: xcode9.4
11-
env: BUILD_SDK=iphonesimulator11.4 DESTINATION="platform=iOS Simulator,name=iPhone 8"
13+
env: SWIFT=4.1 BUILD_SDK=iphonesimulator11.4 DESTINATION="platform=iOS Simulator,name=iPhone 8"
14+
- osx_image: xcode9.4
15+
env: SWIFT=3.3 BUILD_SDK=iphonesimulator11.4 DESTINATION="platform=iOS Simulator,name=iPhone 8"
1216
- osx_image: xcode8.3
13-
env: VERBOSE=true BUILD_SDK=iphonesimulator10.3 DESTINATION="platform=iOS Simulator,name=iPhone 7"
17+
env: SWIFT=3.1 BUILD_SDK=iphonesimulator10.3 DESTINATION="platform=iOS Simulator,name=iPhone 7"
1418

Rakefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'semver'
22

3+
SWIFT = ENV['SWIFT'] || '4.1'
34
BUILD_SDK = ENV['BUILD_SDK'] || 'iphonesimulator11.4'
45
DESTINATION= ENV['DESTINATION'] || 'platform=iOS Simulator,name=iPhone 8'
56
EXAMPLE_PROJECT = 'SkyFloatingLabelTextField/SkyFloatingLabelTextField.xcodeproj'
@@ -36,11 +37,11 @@ end
3637

3738

3839
task :test do
39-
sh "set -o pipefail && xcodebuild test -enableCodeCoverage YES -project #{EXAMPLE_PROJECT} -scheme #{EXAMPLE_SCHEMA} -sdk #{BUILD_SDK} -destination \"#{DESTINATION}\" ONLY_ACTIVE_ARCH=NO | xcpretty"
40+
sh "set -o pipefail && xcodebuild test -enableCodeCoverage YES -project #{EXAMPLE_PROJECT} -scheme #{EXAMPLE_SCHEMA} SWIFT_VERSION=#{SWIFT} -sdk #{BUILD_SDK} -destination \"#{DESTINATION}\" ONLY_ACTIVE_ARCH=NO | xcpretty"
4041
end
4142

4243
task :lint do
43-
sh "bundle exec pod lib lint #{VERBOSE ? '--verbose' : ''}"
44+
sh "bundle exec pod lib lint --swift-version=#{SWIFT} #{VERBOSE ? '--verbose' : ''}"
4445
sh "swiftlint"
4546
end
4647

0 commit comments

Comments
 (0)