Skip to content
This repository was archived by the owner on Dec 15, 2024. It is now read-only.

Commit ee2f75c

Browse files
authored
Merge pull request #42 from PureSwift/feature/swift5
Updated for Swift 5
2 parents 9e8c422 + 3f7de3f commit ee2f75c

File tree

92 files changed

+2936
-6960
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+2936
-6960
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ Xcode/SwiftFoundation.xcodeproj/xcuserdata
1515
Xcode/SwiftFoundation.xcodeproj/project.xcworkspace/xcuserdata
1616

1717
.DS_Store
18+
19+
.swiftpm

.travis.yml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
language: generic
2-
osx_image: xcode8
3-
os:
4-
- linux
5-
sudo: required
6-
dist: trusty
7-
before_install:
8-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install carthage ; fi
9-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then carthage bootstrap ; fi
10-
install:
11-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then SWIFT_DIR=tests ; fi
2+
matrix:
3+
include:
4+
# Test Ubuntu Linux 16.04 / Swift 5.2
5+
- os: linux
6+
dist: xenial
7+
sudo: required
8+
env:
9+
- SWIFT_VERSION=swift-5.2.2-RELEASE
10+
- SWIFT_URL=https://swift.org/builds/swift-5.2.2-release/ubuntu1604/swift-5.2.2-RELEASE/swift-5.2.2-RELEASE-ubuntu16.04.tar.gz
11+
install:
12+
- export PATH=$(pwd)/tests/$SWIFT_VERSION-ubuntu16.04/usr/bin:"${PATH}"
13+
# Test Xcode 11.4 / Swift 5.2.2
14+
- os: osx
15+
osx_image: xcode11.4
16+
addons:
17+
apt:
18+
packages:
19+
- clang
20+
- pkg-config
21+
script:
22+
# Setup Linux environment
1223
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update ; fi
13-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install clang uuid-dev libjson-c-dev ; fi
24+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install clang ; fi
25+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then SWIFT_DIR=tests ; fi
1426
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir $SWIFT_DIR ; fi
15-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl https://swift.org/builds/development/ubuntu1404/$SWIFT_VERSION/$SWIFT_VERSION-ubuntu14.04.tar.gz -s | tar xz -C $SWIFT_DIR &> /dev/null ; fi
16-
env:
17-
- SWIFT_VERSION=swift-DEVELOPMENT-SNAPSHOT-2016-08-04-a
18-
script:
19-
- uname
20-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xctool test -project Xcode/SwiftFoundation.xcodeproj -scheme "SwiftFoundation OS X" -sdk macosx ONLY_ACTIVE_ARCH=NO ; fi
21-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xctool build -project Xcode/SwiftFoundation.xcodeproj -scheme "SwiftFoundation iOS" -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO ; fi
22-
23-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=$(pwd)/tests/$SWIFT_VERSION-ubuntu14.04/usr/bin:"${PATH}" ; fi
24-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift build ; fi
25-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then .build/debug/UnitTests ; fi
26-
27+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl $SWIFT_URL -s | tar xz -C $SWIFT_DIR &> /dev/null ; fi
28+
# Run Unit Tests
29+
- swift test

Cartfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

Cartfile.resolved

Lines changed: 0 additions & 1 deletion
This file was deleted.

Package.pins

Lines changed: 0 additions & 18 deletions
This file was deleted.

Package.swift

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1+
// swift-tools-version:5.1
12
import PackageDescription
23

4+
let libraryType: PackageDescription.Product.Library.LibraryType
5+
#if os(Linux)
6+
libraryType = .dynamic
7+
#else
8+
libraryType = .static
9+
#endif
10+
311
let package = Package(
412
name: "SwiftFoundation",
5-
dependencies: [
6-
.Package(url: "https://github.com/PureSwift/CStatfs.git", majorVersion: 1),
7-
.Package(url: "https://github.com/PureSwift/CJSONC.git", majorVersion: 1)
13+
products: [
14+
.library(
15+
name: "SwiftFoundation",
16+
type: libraryType,
17+
targets: ["SwiftFoundation"]
18+
)
819
],
9-
exclude: ["Xcode", "Carthage"]
20+
targets: [
21+
.target(name: "SwiftFoundation"),
22+
.testTarget(name: "SwiftFoundationTests", dependencies: ["SwiftFoundation"])
23+
]
1024
)

0 commit comments

Comments
 (0)