diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2995288 --- /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: '40 11 * * *' # once a day @ 11:40am UTC (4:40am 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 "TextFileKit-CI" -destination "platform=macOS,arch=x86_64" + - name: Unit Tests + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-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 "TextFileKit-CI" -destination "platform=macOS,variant=Mac Catalyst,arch=x86_64" + - name: Unit Tests + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-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 "TextFileKit-CI" -destination "platform=iOS Simulator,name=iPhone 12" + - name: iPhone 12 Simulator - Unit Tests + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-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 "TextFileKit-CI" -destination "platform=tvOS Simulator,name=Apple TV" + - name: Apple TV - Unit Tests + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-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/xcshareddata/xcschemes/TextFileKit-CI.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/TextFileKit-CI.xcscheme new file mode 100644 index 0000000..a961744 --- /dev/null +++ b/.swiftpm/xcode/xcshareddata/xcschemes/TextFileKit-CI.xcscheme @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 0f13396..b75c2c8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,35 @@ # TextFileKit +[![CI Build Status](https://github.com/orchetect/TextFileKit/actions/workflows/build.yml/badge.svg)](https://github.com/orchetect/TextFileKit/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/TextFileKit/blob/main/LICENSE) + Read and write common delimited text file formats, including: - CSV (comma-separated values) - TSV (tab-separated values) +## Installation + +### Swift Package Manager (SPM) + +To add TextFileKit to your Xcode project: + +1. Select File → Swift Packages → Add Package Dependency +2. Add package using `https://github.com/orchetect/TextFileKit` as the URL. + ## Roadmap -Future library additions could bring additional table data text file formats. \ No newline at end of file +Future library additions could bring additional table data text file formats. + +## Author + +Coded by a bunch of 🐹 hamsters in a trench coat that calls itself [@orchetect](https://github.com/orchetect). + +## License + +Licensed under the MIT license. See [LICENSE](https://github.com/orchetect/TextFileKit/blob/master/LICENSE) for details. + +This library was formerly known as SwiftHex. + +## Contributions + +Contributions are welcome. Feel free to post an Issue to discuss.