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 6c01ae5 commit 605a9a3
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 19 deletions.
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: '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
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
92 changes: 92 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/SwiftASCII-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 = "SwiftASCII"
BuildableName = "SwiftASCII"
BlueprintName = "SwiftASCII"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "SwiftASCIITests"
BuildableName = "SwiftASCIITests"
BlueprintName = "SwiftASCIITests"
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 = "SwiftASCIITests"
BuildableName = "SwiftASCIITests"
BlueprintName = "SwiftASCIITests"
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 = "SwiftASCII"
BuildableName = "SwiftASCII"
BlueprintName = "SwiftASCII"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
23 changes: 4 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
# SwiftASCII

<p>
<a href="https://developer.apple.com/swift">
<img src="https://img.shields.io/badge/Swift%205.3-compatible-orange.svg?style=flat"
alt="Swift 5.3 compatible" /></a>
<a href="#installation">
<img src="https://img.shields.io/badge/SPM-compatible-orange.svg?style=flat"
alt="Swift Package Manager (SPM) compatible" /></a>
<a href="https://developer.apple.com/swift">
<img src="https://img.shields.io/badge/platform-macOS%2010.12%20|%20iOS%209%20|%20tvOS%20|%20watchOS%20-green.svg?style=flat"
alt="Platform - macOS 10.11 | iOS 9 | tvOS | watchOS" /></a>
<a href="#contributions">
<img src="https://img.shields.io/badge/Linux-not%20tested-black.svg?style=flat"
alt="Linux - not tested" /></a>
<a href="https://github.com/orchetect/SwiftASCII/blob/main/LICENSE">
<img src="http://img.shields.io/badge/license-MIT-blue.svg?style=flat"
alt="License: MIT" /></a>
[![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.

Expand All @@ -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

Expand Down Expand Up @@ -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.
Contributions are welcome. Feel free to post an Issue to discuss.

0 comments on commit 605a9a3

Please sign in to comment.