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

Commit

Permalink
Merge branch 'release/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Jun 5, 2020
2 parents 371ec55 + ae7093c commit 1cb98a6
Show file tree
Hide file tree
Showing 82 changed files with 2,969 additions and 6,405 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ Xcode/SwiftFoundation.xcodeproj/xcuserdata
Xcode/SwiftFoundation.xcodeproj/project.xcworkspace/xcuserdata

.DS_Store

.swiftpm
49 changes: 26 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
language: generic
osx_image: xcode8
os:
- linux
sudo: required
dist: trusty
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install carthage ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then carthage bootstrap ; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then SWIFT_DIR=tests ; fi
matrix:
include:
# Test Ubuntu Linux 16.04 / Swift 5.2
- os: linux
dist: xenial
sudo: required
env:
- SWIFT_VERSION=swift-5.2.2-RELEASE
- 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
install:
- export PATH=$(pwd)/tests/$SWIFT_VERSION-ubuntu16.04/usr/bin:"${PATH}"
# Test Xcode 11.4 / Swift 5.2.2
- os: osx
osx_image: xcode11.4
addons:
apt:
packages:
- clang
- pkg-config
script:
# Setup Linux environment
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install clang uuid-dev libjson-c-dev ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install clang ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then SWIFT_DIR=tests ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir $SWIFT_DIR ; fi
- 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
env:
- SWIFT_VERSION=swift-DEVELOPMENT-SNAPSHOT-2016-08-04-a
script:
- uname
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xctool test -project Xcode/SwiftFoundation.xcodeproj -scheme "SwiftFoundation OS X" -sdk macosx ONLY_ACTIVE_ARCH=NO ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xctool build -project Xcode/SwiftFoundation.xcodeproj -scheme "SwiftFoundation iOS" -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO ; fi

- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=$(pwd)/tests/$SWIFT_VERSION-ubuntu14.04/usr/bin:"${PATH}" ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift build ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then .build/debug/UnitTests ; fi

- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl $SWIFT_URL -s | tar xz -C $SWIFT_DIR &> /dev/null ; fi
# Run Unit Tests
- swift test
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

1 change: 0 additions & 1 deletion Cartfile.resolved

This file was deleted.

22 changes: 18 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
// swift-tools-version:5.1
import PackageDescription

let libraryType: PackageDescription.Product.Library.LibraryType
#if os(Linux)
libraryType = .dynamic
#else
libraryType = .static
#endif

let package = Package(
name: "SwiftFoundation",
dependencies: [
.Package(url: "https://github.com/PureSwift/CStatfs.git", majorVersion: 1),
.Package(url: "https://github.com/PureSwift/CJSONC.git", majorVersion: 1)
products: [
.library(
name: "SwiftFoundation",
type: libraryType,
targets: ["SwiftFoundation"]
)
],
exclude: ["Xcode", "Carthage"]
targets: [
.target(name: "SwiftFoundation"),
.testTarget(name: "SwiftFoundationTests", dependencies: ["SwiftFoundation"])
]
)
31 changes: 8 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# SwiftFoundation #
[![Swift](https://img.shields.io/badge/swift-3.0-orange.svg?style=flat)](https://developer.apple.com/swift/)
[![Platforms](https://img.shields.io/badge/platform-osx%20%7C%20ios%20%7C%20watchos%20%7C%20tvos%20%7C%20linux-lightgrey.svg)](https://developer.apple.com/swift/)
[![Swift](https://img.shields.io/badge/swift-5.0-orange.svg?style=flat)](https://developer.apple.com/swift/)
[![Platforms](https://img.shields.io/badge/platform-osx%20%7C%20ios%20%7C%20watchos%20%7C%20tvos%20%7C%20linux%20%7C%20wasm-lightgrey.svg)](https://developer.apple.com/swift/)
[![Release](https://img.shields.io/github/release/pureswift/swiftfoundation.svg)](https://github.com/PureSwift/SwiftFoundation/releases)
[![License](https://img.shields.io/badge/license-MIT-71787A.svg)](https://tldrlegal.com/license/mit-license)
[![Build Status](https://travis-ci.org/PureSwift/SwiftFoundation.svg?branch=develop)](https://travis-ci.org/PureSwift/SwiftFoundation)
[![Join the chat at https://gitter.im/PureSwift/SwiftFoundation](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/PureSwift/SwiftFoundation?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![SPM compatible](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)](https://github.com/apple/swift-package-manager)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

Cross-Platform, Protocol-Oriented Programming base library to complement the Swift Standard Library.

Expand All @@ -27,30 +23,19 @@ Cross-Platform, Protocol-Oriented Programming base library to complement the Swi

## Targeted Platforms

- LLVM Compiler
- Darwin (OS X, iOS, WatchOS)
- Linux

## Compiling on Ubuntu

```
sudo apt-get install uuid-dev libjson-c-dev
swift build
.build/debug/UnitTests
```
- Darwin (macOS, iOS, watchOS, tvOS)
- Linux (Ubuntu x86_64, [Debian Armv7](https://github.com/uraimo/buildSwiftOnARM))
- [WebAssembly](https://swiftwasm.org) (wasm32)

## Implemented
To see what parts of Foundation are implemented, just look at the unit tests. Completed functionality will be fully unit tested. Note that there is some functionality that is written as a protocol only, that will not be included on this list.

- [x] Base64
- [x] Data
- [x] Date
- [x] FileManager
- [x] JSON
- [x] Null
- [x] Order (equivalent to ```NSComparisonResult```)
- [X] RegularExpression (POSIX, not ICU)
- [x] SortDescriptor
- [ ] FileManager
- [ ] JSON
- [ ] RegularExpression (POSIX, not ICU)
- [x] Thread
- [x] URL
- [x] UUID
Expand Down
Loading

0 comments on commit 1cb98a6

Please sign in to comment.