Skip to content

Commit

Permalink
Migrating to Swift 5.0 / Xcode 10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
daisuke-t-jp committed Mar 26, 2019
1 parent 3d0ac03 commit 168c86d
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2
5.0
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ matrix:
include:
- os: osx
language: swift
osx_image: xcode10
osx_image: xcode10.2
script:
# iOS
- xcodebuild clean -project "MurmurHash.xcodeproj"
Expand All @@ -18,7 +18,7 @@ matrix:

# tvOS
- xcodebuild clean -project "MurmurHash.xcodeproj"
- xcodebuild test -project "MurmurHash.xcodeproj" -scheme "MurmurHash-tvOS" -sdk appletvsimulator -destination "OS=12.0,name=Apple TV 4K" -configuration Debug
- xcodebuild test -project "MurmurHash.xcodeproj" -scheme "MurmurHash-tvOS" -sdk appletvsimulator -destination "OS=12.2,name=Apple TV 4K" -configuration Debug

- os: linux
language: generic
Expand Down Expand Up @@ -54,8 +54,8 @@ matrix:
- tzdata
- rsync
script:
- wget https://swift.org/builds/swift-4.2-release/ubuntu1604/swift-4.2-RELEASE/swift-4.2-RELEASE-ubuntu16.04.tar.gz
- tar xvfz swift-4.2-RELEASE-ubuntu16.04.tar.gz
- export PATH=$(pwd)/swift-4.2-RELEASE-ubuntu16.04/usr/bin:"${PATH}"
- wget https://swift.org/builds/swift-5.0-release/ubuntu1604/swift-5.0-RELEASE/swift-5.0-RELEASE-ubuntu16.04.tar.gz
- tar xvfz swift-5.0-RELEASE-ubuntu16.04.tar.gz
- export PATH=$(pwd)/swift-5.0-RELEASE-ubuntu16.04/usr/bin:"${PATH}"
- swift build
- swift test
2 changes: 1 addition & 1 deletion MurmurHash-Swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Pod::Spec.new do |spec|


# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
spec.swift_version = "4.2"
spec.swift_version = "5.0"
spec.requires_arc = true

end
36 changes: 23 additions & 13 deletions MurmurHash.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -340,18 +340,27 @@
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = MurmurHash;
TargetAttributes = {
0290FBB7220C01610076E82F = {
LastSwiftMigration = 1020;
};
0290FBC3220C03F40076E82F = {
LastSwiftMigration = 1020;
};
029CB1F6220A9D6C00FA2648 = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1010;
LastSwiftMigration = 1020;
};
029CB209220ACBD200FA2648 = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1020;
};
7E3D40B122114F8B00A66B74 = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1020;
};
7E3D40B922114F8B00A66B74 = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1020;
};
};
};
Expand All @@ -361,6 +370,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 029CB1ED220A9D6C00FA2648;
productRefGroup = 029CB1F8220A9D6C00FA2648 /* Products */;
Expand Down Expand Up @@ -587,7 +597,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -614,7 +624,7 @@
PRODUCT_NAME = MurmurHash;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -636,7 +646,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -658,7 +668,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down Expand Up @@ -808,7 +818,7 @@
PRODUCT_NAME = MurmurHash;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -833,7 +843,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHash.MurmurHash;
PRODUCT_NAME = MurmurHash;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -854,7 +864,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHash.MurmurHashTests;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -875,7 +885,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHash.MurmurHashTests;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -901,7 +911,7 @@
PRODUCT_NAME = MurmurHash;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 12.0;
};
Expand All @@ -928,7 +938,7 @@
PRODUCT_NAME = MurmurHash;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 12.0;
};
Expand All @@ -948,7 +958,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHash.MurmurHashTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 12.0;
};
Expand All @@ -968,7 +978,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHash.MurmurHashTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 12.0;
};
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:4.2
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down Expand Up @@ -28,7 +28,7 @@ let package = Package(
name: "MurmurHashTests",
dependencies: ["MurmurHash_Swift"]),
],
swiftLanguageVersions: [.v4_2]
swiftLanguageVersions: [.v5]
)
#else
fatalError("Unsupported OS")
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<img src="https://raw.githubusercontent.com/daisuke-t-jp/MurmurHash-Swift/master/images/header.png" width="700"></br>
------
![Platform](https://img.shields.io/badge/Platform-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20Linux-blue.svg)
[![Language Swift%204.2](https://img.shields.io/badge/Language-Swift%204.2-orange.svg)](https://developer.apple.com/swift)
[![Language Swift%204.2,%205.0](https://img.shields.io/badge/Language-Swift%204.2,%205.0-orange.svg)](https://developer.apple.com/swift)
[![Cocoapods](https://img.shields.io/cocoapods/v/MurmurHash-Swift.svg)](https://cocoapods.org/pods/MurmurHash-Swift)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-green.svg)](https://github.com/Carthage/Carthage)
[![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-green.svg)](https://github.com/apple/swift-package-manager)
Expand All @@ -22,7 +22,7 @@ A framework includes MurmurHash3's x86_32/x86_128/x64_128 functions.
- macOS 10.12+
- tvOS 12.0+
- Linux
- Swift 4.2+
- Swift 4.2, 5.0


# Installation
Expand All @@ -46,7 +46,11 @@ let package = Package(
name: "YOUR_PACKAGE_NAME",
targets: [],
dependencies: [
.package(url: "https://github.com/daisuke-t-jp/MurmurHash-Swift.git", from: "1.0.0")
// Swift 4.2
.package(url: "https://github.com/daisuke-t-jp/MurmurHash-Swift.git", .exact("1.0.11"))

// Swift 5.0
.package(url: "https://github.com/daisuke-t-jp/MurmurHash-Swift.git", from: "1.0.12")
]
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
TargetAttributes = {
029266DD220C1403002CADA5 = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1020;
};
};
};
Expand Down Expand Up @@ -363,7 +364,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHashDemoMacOS.MurmurHashDemoMacOS;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -382,7 +383,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHashDemoMacOS.MurmurHashDemoMacOS;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
4 changes: 2 additions & 2 deletions demo/MurmurHashDemoMacOS/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- MurmurHash-Swift (1.0.10)
- MurmurHash-Swift (1.0.11)

DEPENDENCIES:
- MurmurHash-Swift (from `../../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../../"

SPEC CHECKSUMS:
MurmurHash-Swift: 14408aaa255a193926af4811382e0d2e1492a0dd
MurmurHash-Swift: 916d2d476235c4e422d71f279778491b449dfa8f

PODFILE CHECKSUM: fbd6152bac18e2f0984e86e52ff13e5f9b0e1d32

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
TargetAttributes = {
7E3D40D42211512300A66B74 = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1020;
};
};
};
Expand Down Expand Up @@ -359,7 +360,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHashDemoTvOS.MurmurHashDemoTvOS;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 12.0;
};
Expand All @@ -379,7 +380,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHashDemoTvOS.MurmurHashDemoTvOS;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 12.0;
};
Expand Down
4 changes: 2 additions & 2 deletions demo/MurmurHashDemoTvOS/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- MurmurHash-Swift (1.0.10)
- MurmurHash-Swift (1.0.11)

DEPENDENCIES:
- MurmurHash-Swift (from `../../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../../"

SPEC CHECKSUMS:
MurmurHash-Swift: 14408aaa255a193926af4811382e0d2e1492a0dd
MurmurHash-Swift: 916d2d476235c4e422d71f279778491b449dfa8f

PODFILE CHECKSUM: 43de0cc08e9e50a3d4efc4321ceeaa6f50e10908

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
TargetAttributes = {
0290FBE0220C0E990076E82F = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1020;
};
};
};
Expand Down Expand Up @@ -372,7 +373,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHashDemoiOS.MurmurHashDemoiOS;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -390,7 +391,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.MurmurHashDemoiOS.MurmurHashDemoiOS;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
4 changes: 2 additions & 2 deletions demo/MurmurHashDemoiOS/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- MurmurHash-Swift (1.0.10)
- MurmurHash-Swift (1.0.11)

DEPENDENCIES:
- MurmurHash-Swift (from `../../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../../"

SPEC CHECKSUMS:
MurmurHash-Swift: 14408aaa255a193926af4811382e0d2e1492a0dd
MurmurHash-Swift: 916d2d476235c4e422d71f279778491b449dfa8f

PODFILE CHECKSUM: 7586ba04d7c7e25ed06acab50128f431428e7152

Expand Down

0 comments on commit 168c86d

Please sign in to comment.