diff --git a/.travis.yml b/.travis.yml index afea3a0..d312762 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,19 @@ os: - osx + - linux language: generic sudo: required dist: trusty -osx_image: xcode9 +osx_image: xcode10 +install: + - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" +env: + - SWIFT_VERSION=4.2 script: - - swift build + - swift package update - swift test +after_success: + - git clone https://github.com/dn-m/Documentarian && cd Documentarian + - swift build -c release -Xswiftc -static-stdlib + - cd ../ + - Documentarian/.build/Release/Documentarian diff --git a/Package.resolved b/Package.resolved index 22a2e19..db2c454 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,16 +6,25 @@ "repositoryURL": "https://github.com/dn-m/Math", "state": { "branch": "master", - "revision": "d1284e043377c0b924cba2ffa2ab0b9aa9dd246f", + "revision": "075ebb5a934251ed7acbe4feace925ed7e322d0f", "version": null } }, + { + "package": "PerformanceTesting", + "repositoryURL": "https://github.com/dn-m/PerformanceTesting", + "state": { + "branch": null, + "revision": "d48417c837b1a029dd9567dfa7b5ee3cfa9a0ec7", + "version": "0.3.0" + } + }, { "package": "Structure", "repositoryURL": "https://github.com/dn-m/Structure", "state": { "branch": "master", - "revision": "81d894ed931864734c73f9507e5d2f147b40a363", + "revision": "11e920b1b883fe169c5ebb58e6489c0f28e9ad90", "version": null } } diff --git a/Package.swift b/Package.swift index 4aac7b4..7dcafc2 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:4.0 +// swift-tools-version:4.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/Sources/Timeline/Action.swift b/Sources/Timeline/Action.swift index c3f8ff5..8ce77eb 100644 --- a/Sources/Timeline/Action.swift +++ b/Sources/Timeline/Action.swift @@ -5,7 +5,6 @@ // Created by James Bean on 8/3/17. // -import Structure import DataStructures import Time @@ -51,6 +50,6 @@ public class Action { } func hasAnyIdentifiers (_ identifiers: S) -> Bool where S: Sequence, S.Element == String { - return identifiers.any(satisfy: hasIdentifier) + return self.identifiers.contains(where: identifiers.contains) } } diff --git a/Sources/Timeline/Schedule.swift b/Sources/Timeline/Schedule.swift index 2c7387f..2025125 100644 --- a/Sources/Timeline/Schedule.swift +++ b/Sources/Timeline/Schedule.swift @@ -7,7 +7,6 @@ // import Foundation -import StructureWrapping import DataStructures import Time diff --git a/Sources/Timeline/SubSchedule.swift b/Sources/Timeline/SubSchedule.swift index 19d160f..c0428fa 100644 --- a/Sources/Timeline/SubSchedule.swift +++ b/Sources/Timeline/SubSchedule.swift @@ -30,7 +30,7 @@ internal class SubSchedule { private func bump(_ actions: [Action], from offset: Seconds) { (actions as! [Action.Looping]) .map { action in (offset + action.interval, action) } - .forEach { offset, action in base.safelyAppend(action, toArrayWith: offset) } + .forEach { insert($1, at: $0) } base[offset] = nil } } @@ -60,7 +60,7 @@ internal class SubSchedule { /// Add the given `action` at the given `offset`. internal func insert(_ action: Action, at offset: Seconds) { - base.safelyAppend(action, toArrayWith: offset) + base.safelyAppend(action, forKey: offset) } /// Insert the contents of the given `schedule` into this one.