Skip to content

Commit

Permalink
Initial GitHub CI commit
Browse files Browse the repository at this point in the history
  • Loading branch information
orchetect committed Jul 28, 2021
1 parent a513bed commit a966846
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 1 deletion.
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
92 changes: 92 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/TextFileKit-CI.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "TextFileKit"
BuildableName = "TextFileKit"
BlueprintName = "TextFileKit"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "TextFileKitTests"
BuildableName = "TextFileKitTests"
BlueprintName = "TextFileKitTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "TextFileKitTests"
BuildableName = "TextFileKitTests"
BlueprintName = "TextFileKitTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "TextFileKit"
BuildableName = "TextFileKit"
BlueprintName = "TextFileKit"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
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.

0 comments on commit a966846

Please sign in to comment.