Skip to content

Commit a966846

Browse files
committed
Initial GitHub CI commit
1 parent a513bed commit a966846

3 files changed

Lines changed: 186 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
paths-ignore:
7+
- 'Docs/**' # Docs folder in root of repo
8+
- '**/*.md' # .md files anywhere in the repo
9+
- '**/LICENSE' # LICENSE files anywhere in the repo
10+
- '**/.gitignore' # .gitignore files anywhere in the repo
11+
12+
pull_request:
13+
branches: [main]
14+
paths-ignore:
15+
- 'Docs/**' # Docs folder in root of repo
16+
- '**/*.md' # .md files anywhere in the repo
17+
- '**/LICENSE' # LICENSE files anywhere in the repo
18+
- '**/.gitignore' # .gitignore files anywhere in the repo
19+
20+
workflow_dispatch:
21+
22+
schedule:
23+
- cron: '40 11 * * *' # once a day @ 11:40am UTC (4:40am PST)
24+
25+
jobs:
26+
macOS:
27+
name: macOS
28+
runs-on: macos-latest
29+
steps:
30+
- uses: actions/checkout@main
31+
- name: Build
32+
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-CI" -destination "platform=macOS,arch=x86_64"
33+
- name: Unit Tests
34+
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-CI" -destination "platform=macOS,arch=x86_64"
35+
36+
macCatalyst:
37+
name: macCatalyst
38+
runs-on: macos-latest
39+
steps:
40+
- uses: actions/checkout@main
41+
- name: Build
42+
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-CI" -destination "platform=macOS,variant=Mac Catalyst,arch=x86_64"
43+
- name: Unit Tests
44+
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-CI" -destination "platform=macOS,variant=Mac Catalyst,arch=x86_64"
45+
46+
iOS:
47+
name: iOS
48+
runs-on: macos-latest # this must be macos, GitHub does not offer iOS directly but we can use xcodebuild
49+
steps:
50+
- uses: actions/checkout@main
51+
- name: iPhone 12 Simulator - Build
52+
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-CI" -destination "platform=iOS Simulator,name=iPhone 12"
53+
- name: iPhone 12 Simulator - Unit Tests
54+
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-CI" -destination "platform=iOS Simulator,name=iPhone 12"
55+
56+
tvOS:
57+
name: tvOS
58+
runs-on: macos-latest # this must be macos, GitHub does not offer tvOS directly but we can use xcodebuild
59+
steps:
60+
- uses: actions/checkout@main
61+
- name: Apple TV - Build
62+
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-CI" -destination "platform=tvOS Simulator,name=Apple TV"
63+
- name: Apple TV - Unit Tests
64+
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TextFileKit-CI" -destination "platform=tvOS Simulator,name=Apple TV"
65+
66+
67+
# xcodebuild test reference:
68+
# https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/08-automation.html
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1240"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "TextFileKit"
18+
BuildableName = "TextFileKit"
19+
BlueprintName = "TextFileKit"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "YES"
27+
buildForArchiving = "NO"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "TextFileKitTests"
32+
BuildableName = "TextFileKitTests"
33+
BlueprintName = "TextFileKitTests"
34+
ReferencedContainer = "container:">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
</BuildActionEntries>
38+
</BuildAction>
39+
<TestAction
40+
buildConfiguration = "Debug"
41+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
42+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43+
shouldUseLaunchSchemeArgsEnv = "YES"
44+
codeCoverageEnabled = "YES">
45+
<Testables>
46+
<TestableReference
47+
skipped = "NO">
48+
<BuildableReference
49+
BuildableIdentifier = "primary"
50+
BlueprintIdentifier = "TextFileKitTests"
51+
BuildableName = "TextFileKitTests"
52+
BlueprintName = "TextFileKitTests"
53+
ReferencedContainer = "container:">
54+
</BuildableReference>
55+
</TestableReference>
56+
</Testables>
57+
</TestAction>
58+
<LaunchAction
59+
buildConfiguration = "Debug"
60+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
61+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
62+
launchStyle = "0"
63+
useCustomWorkingDirectory = "NO"
64+
ignoresPersistentStateOnLaunch = "NO"
65+
debugDocumentVersioning = "YES"
66+
debugServiceExtension = "internal"
67+
allowLocationSimulation = "YES">
68+
</LaunchAction>
69+
<ProfileAction
70+
buildConfiguration = "Release"
71+
shouldUseLaunchSchemeArgsEnv = "YES"
72+
savedToolIdentifier = ""
73+
useCustomWorkingDirectory = "NO"
74+
debugDocumentVersioning = "YES">
75+
<MacroExpansion>
76+
<BuildableReference
77+
BuildableIdentifier = "primary"
78+
BlueprintIdentifier = "TextFileKit"
79+
BuildableName = "TextFileKit"
80+
BlueprintName = "TextFileKit"
81+
ReferencedContainer = "container:">
82+
</BuildableReference>
83+
</MacroExpansion>
84+
</ProfileAction>
85+
<AnalyzeAction
86+
buildConfiguration = "Debug">
87+
</AnalyzeAction>
88+
<ArchiveAction
89+
buildConfiguration = "Release"
90+
revealArchiveInOrganizer = "YES">
91+
</ArchiveAction>
92+
</Scheme>

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
11
# TextFileKit
22

3+
[![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)
4+
35
Read and write common delimited text file formats, including:
46

57
- CSV (comma-separated values)
68
- TSV (tab-separated values)
79

10+
## Installation
11+
12+
### Swift Package Manager (SPM)
13+
14+
To add TextFileKit to your Xcode project:
15+
16+
1. Select File → Swift Packages → Add Package Dependency
17+
2. Add package using `https://github.com/orchetect/TextFileKit` as the URL.
18+
819
## Roadmap
920

10-
Future library additions could bring additional table data text file formats.
21+
Future library additions could bring additional table data text file formats.
22+
23+
## Author
24+
25+
Coded by a bunch of 🐹 hamsters in a trench coat that calls itself [@orchetect](https://github.com/orchetect).
26+
27+
## License
28+
29+
Licensed under the MIT license. See [LICENSE](https://github.com/orchetect/TextFileKit/blob/master/LICENSE) for details.
30+
31+
This library was formerly known as SwiftHex.
32+
33+
## Contributions
34+
35+
Contributions are welcome. Feel free to post an Issue to discuss.

0 commit comments

Comments
 (0)