diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3dbc3b5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,68 @@ +name: build + +on: + push: + branches: [main, dev] + paths-ignore: + - 'Docs/**' # Docs folder in root of repo + - '**/*.md' # .md files anywhere in the repo + - '**/LICENSE' # LICENSE files anywhere in the repo + - '**/.gitignore' # .gitignore files anywhere in the repo + + pull_request: + branches: [main] + paths-ignore: + - 'Docs/**' # Docs folder in root of repo + - '**/*.md' # .md files anywhere in the repo + - '**/LICENSE' # LICENSE files anywhere in the repo + - '**/.gitignore' # .gitignore files anywhere in the repo + + workflow_dispatch: + + schedule: + - cron: '50 11 * * *' # once a day @ 11:50am UTC (4:50am PST) + +jobs: + macOS: + name: macOS + runs-on: macos-latest + steps: + - uses: actions/checkout@main + - name: Build + run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=macOS,arch=x86_64" + - name: Unit Tests + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=macOS,arch=x86_64" + + macCatalyst: + name: macCatalyst + runs-on: macos-latest + steps: + - uses: actions/checkout@main + - name: Build + run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=macOS,variant=Mac Catalyst,arch=x86_64" + - name: Unit Tests + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=macOS,variant=Mac Catalyst,arch=x86_64" + + iOS: + name: iOS + runs-on: macos-latest # this must be macos, GitHub does not offer iOS directly but we can use xcodebuild + steps: + - uses: actions/checkout@main + - name: iPhone 12 Simulator - Build + run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=iOS Simulator,name=iPhone 12" + - name: iPhone 12 Simulator - Unit Tests + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=iOS Simulator,name=iPhone 12" + + tvOS: + name: tvOS + runs-on: macos-latest # this must be macos, GitHub does not offer tvOS directly but we can use xcodebuild + steps: + - uses: actions/checkout@main + - name: Apple TV - Build + run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=tvOS Simulator,name=Apple TV" + - name: Apple TV - Unit Tests + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=tvOS Simulator,name=Apple TV" + + +# xcodebuild test reference: +# https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/08-automation.html \ No newline at end of file diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/SwiftASCII-CI.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/SwiftASCII-CI.xcscheme new file mode 100644 index 0000000..8567100 --- /dev/null +++ b/.swiftpm/xcode/xcshareddata/xcschemes/SwiftASCII-CI.xcscheme @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 675540f..1744581 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,6 @@ # SwiftASCII -

- -Swift 5.3 compatible - -Swift Package Manager (SPM) compatible - -Platform - macOS 10.11 | iOS 9 | tvOS | watchOS - -Linux - not tested - -License: MIT +[![CI Build Status](https://github.com/orchetect/SwiftASCII/actions/workflows/build.yml/badge.svg)](https://github.com/orchetect/SwiftASCII/actions/workflows/build.yml) [![Platforms - macOS | iOS | tvOS | watchOS](https://img.shields.io/badge/platforms-macOS%20|%20iOS%20|%20tvOS%20|%20watchOS%20-lightgrey.svg?style=flat)](https://developer.apple.com/swift) [![License: MIT](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](https://github.com/orchetect/SwiftASCII/blob/main/LICENSE) Type-safe `ASCIIString` and `ASCIICharacter` types for Swift. @@ -25,10 +10,10 @@ Complete unit test coverage. ### Swift Package Manager (SPM) -To add ASCIIString to your Xcode project: +To add SwiftASCII to your Xcode project: 1. Select File → Swift Packages → Add Package Dependency -2. Add package using `https://github.com/orchetect/ASCIIString` as the URL. +2. Add package using `https://github.com/orchetect/SwiftASCII` as the URL. ## Getting Started @@ -105,4 +90,4 @@ Licensed under the MIT license. See [LICENSE](https://github.com/orchetect/Swift ## Contributions -Contributions are welcome. Feel free to post an Issue to discuss. \ No newline at end of file +Contributions are welcome. Feel free to post an Issue to discuss.