Skip to content

Commit

Permalink
Swift 5 (#42)
Browse files Browse the repository at this point in the history
* Swift 5

* XcodeGen
  • Loading branch information
stephencelis authored Mar 26, 2019
1 parent feb18e7 commit a0b6fb9
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
jobs:
build:
macos:
xcode: "10.1.0"
xcode: "10.2.0"

steps:
- checkout
Expand Down
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1
swift-5.0-DEVELOPMENT-SNAPSHOT-2019-03-10-a
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM swift:4.2
FROM norionomura/swift:swift-5.0-branch

WORKDIR /package

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Point-Free, Inc.
Copyright (c) 2019 Point-Free, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ imports = \
@testable import OvertureTests;

xcodeproj:
xcodegen
PF_DEVELOP=1 swift run xcodegen

linux-main:
sourcery \
Expand All @@ -27,7 +27,7 @@ test-ios:
set -o pipefail && \
xcodebuild test \
-scheme Overture_iOS \
-destination platform="iOS Simulator,name=iPhone XR,OS=12.1" \
-destination platform="iOS Simulator,name=iPhone XR,OS=12.2" \
| xcpretty

test-swift:
Expand Down
8 changes: 0 additions & 8 deletions Package.resolved

This file was deleted.

13 changes: 10 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// swift-tools-version:4.0
// swift-tools-version:5.0
import Foundation
import PackageDescription

let package = Package(
Expand All @@ -8,8 +9,6 @@ let package = Package(
name: "Overture",
targets: ["Overture"]),
],
dependencies: [
],
targets: [
.target(
name: "Overture",
Expand All @@ -19,3 +18,11 @@ let package = Package(
dependencies: ["Overture"]),
]
)

if ProcessInfo.processInfo.environment.keys.contains("PF_DEVELOP") {
package.dependencies.append(
contentsOf: [
.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.3.0"),
]
)
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🎼 Overture

[![Swift 4.2](https://img.shields.io/badge/swift-4.2-ED523F.svg?style=flat)](https://swift.org/download/)
[![Swift 5](https://img.shields.io/badge/swift-5-ED523F.svg?style=flat)](https://swift.org/download/)
[![iOS/macOS CI](https://img.shields.io/circleci/project/github/pointfreeco/swift-overture/master.svg?label=ios/macos)](https://circleci.com/gh/pointfreeco/swift-overture)
[![Linux CI](https://img.shields.io/travis/pointfreeco/swift-overture/master.svg?label=linux)](https://travis-ci.org/pointfreeco/swift-overture)
[![@pointfreeco](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/pointfreeco)
Expand Down
32 changes: 31 additions & 1 deletion Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@ extension FlipTests {
("testFlip", testFlip)
]
}
extension KeyPathTests {
static var allTests: [(String, (KeyPathTests) -> () throws -> Void)] = [
("testGet", testGet),
("testProp", testProp),
("testOver", testOver),
("testSet", testSet),
("testInoutMprop", testInoutMprop),
("testInoutMver", testInoutMver),
("testInoutMut", testInoutMut),
("testAnyObjectAnyObjectMprop", testAnyObjectAnyObjectMprop),
("testAnyObjectInoutMprop", testAnyObjectInoutMprop),
("testAnyObjectAnyObjectMver", testAnyObjectAnyObjectMver),
("testAnyObjectInoutMver", testAnyObjectInoutMver),
("testAnyObjectMut", testAnyObjectMut)
]
}
extension PipeTests {
static var allTests: [(String, (PipeTests) -> () throws -> Void)] = [
("testPipe2", testPipe2),
Expand All @@ -75,6 +91,17 @@ extension PipeTests {
("testThrowingPipe6", testThrowingPipe6)
]
}
extension SettersTests {
static var allTests: [(String, (SettersTests) -> () throws -> Void)] = [
("testOver", testOver),
("testSet", testSet),
("testInoutMver", testInoutMver),
("testAnyObjectInoutMver", testAnyObjectInoutMver),
("testAnyObjectAnyObjectMver", testAnyObjectAnyObjectMver),
("testInoutMut", testInoutMut),
("testAnyObjectMut", testAnyObjectMut)
]
}
extension UncurryTests {
static var allTests: [(String, (UncurryTests) -> () throws -> Void)] = [
("testUncurry", testUncurry),
Expand All @@ -86,7 +113,8 @@ extension WithTests {
("testWith", testWith),
("testInPlaceWith", testInPlaceWith),
("testValueCopyableWith", testValueCopyableWith),
("testReferenceMutableWith", testReferenceMutableWith)
("testReferenceMutableWith", testReferenceMutableWith),
("testAmbiguity", testAmbiguity)
]
}
extension ZipTests {
Expand All @@ -112,7 +140,9 @@ XCTMain([
testCase(ConcatTests.allTests),
testCase(CurryTests.allTests),
testCase(FlipTests.allTests),
testCase(KeyPathTests.allTests),
testCase(PipeTests.allTests),
testCase(SettersTests.allTests),
testCase(UncurryTests.allTests),
testCase(WithTests.allTests),
testCase(ZipTests.allTests),
Expand Down
4 changes: 2 additions & 2 deletions project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ targets:
path: Info.plist
platform: [macOS, iOS, tvOS, watchOS]
scheme:
testTargets: [OvertureTests_$platform]
testTargets: ['OvertureTests_${platform}']
settings:
APPLICATION_EXTENSION_API_ONLY: true
sources: [Sources]
type: framework
OvertureTests:
dependencies: [{target: Overture_$platform}]
dependencies: [{target: 'Overture_${platform}'}]
platform: [macOS, iOS, tvOS, watchOS]
sources:
- path: Tests
Expand Down

0 comments on commit a0b6fb9

Please sign in to comment.