Skip to content

Commit

Permalink
Add missing import for swift build
Browse files Browse the repository at this point in the history
Add action workflow to SwiftPM CI
  • Loading branch information
phimage committed Nov 1, 2019
1 parent 5695b97 commit 2e75d62
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build
on: push
jobs:
build:
name: build
runs-on: macOS-10.14
env:
DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Swift build
run: |
sdk=`xcrun -sdk iphonesimulator -show-sdk-path`
sdkVersion=`echo $sdk | sed -E 's/.*iPhoneSimulator(.*)\.sdk/\1/'`
swift build -Xswiftc "-sdk" -Xswiftc "$sdk" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios$sdkVersion-simulator"
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint
on: push
jobs:
lint:
name: Lint
runs-on: macOS-10.14
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Install swiftlint
run: |
brew install swiftlint
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Code Lint
run: |
swiftlint --strict
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test
on: push
jobs:
build:
name: test
runs-on: macOS-10.14
env:
DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Swift test
run: |
sdk=`xcrun -sdk iphonesimulator -show-sdk-path`
sdkVersion=`echo $sdk | sed -E 's/.*iPhoneSimulator(.*)\.sdk/\1/'`
swift test -Xswiftc "-sdk" -Xswiftc "$sdk" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios$sdkVersion-simulator"
8 changes: 8 additions & 0 deletions Sources/Handler/OAuthSwiftOpenURLExternally.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@

import Foundation

#if os(iOS) || os(tvOS)
import UIKit
#elseif os(watchOS)
import WatchKit
#elseif os(OSX)
import AppKit
#endif

/// Open externally using open url application function.
open class OAuthSwiftOpenURLExternally: OAuthSwiftURLHandlerType {

Expand Down

0 comments on commit 2e75d62

Please sign in to comment.