Skip to content

Commit ae1a220

Browse files
migrate travis to swift package
update gitignore fix linux project update gitignore
1 parent bf2f035 commit ae1a220

34 files changed

+59
-21
lines changed

.github/workflows/swift.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Compile and test
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
macos:
7+
name: macos | compile and test
8+
runs-on: macos-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Run tests
12+
run: swift test
13+
14+
linux:
15+
name: linux | compile
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Compile project
20+
run: swift build

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ xcuserdata
2121
*.xcuserstate
2222
*.xcscmblueprint
2323
**.DS_Store
24+
.travis.yml
25+
.ruby-version
2426

2527
## Obj-C/Swift specific
2628
*.hmap
@@ -34,3 +36,8 @@ Pods/
3436
# Carthage
3537
Carthage
3638
**/Carthage/**
39+
40+
## Swift package
41+
**/LinuxMain.swift
42+
**/XCTestManifests.swift
43+
Swiftline.xcodeproj

.travis.yml

-17
This file was deleted.

LinuxMain.swift

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import XCTest
2+
3+
var tests = [XCTestCaseEntry]()
4+
XCTMain(tests)

Package.resolved

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "Nimble",
6+
"repositoryURL": "https://github.com/Quick/Nimble.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "7fd118ec8795888bcbbebc1a41f6984454c4cd6f",
10+
"version": "8.0.7"
11+
}
12+
},
13+
{
14+
"package": "Quick",
15+
"repositoryURL": "https://github.com/Quick/Quick.git",
16+
"state": {
17+
"branch": null,
18+
"revision": "33682c2f6230c60614861dfc61df267e11a1602f",
19+
"version": "2.2.0"
20+
}
21+
}
22+
]
23+
},
24+
"version": 1
25+
}

Package.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ let package = Package(
1414
.package(url: "https://github.com/Quick/Nimble.git", from: "8.0.7"),
1515
],
1616
targets: [
17-
.target(name: "Swiftline"),
17+
.target(name: "Swiftline", path: "Sources"),
1818
.testTarget(name: "SwiftlineTests",
1919
dependencies: [.target(name: "Swiftline"),
2020
.product(name: "Quick"),
2121
.product(name: "Nimble")],
22-
path: "SwiftlineTests"),
22+
path: "Tests"),
2323
]
2424
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Source/Swiftline/CommandExecutor.swift renamed to Sources/CommandExecutor.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class LogTaskExecutor: TaskExecutor {
108108
func execute(_ commandParts: [String]) -> ExecutorReturnValue {
109109
let argv: [UnsafeMutablePointer<CChar>?] = commandParts.map { $0.withCString(strdup) }
110110
var pid: pid_t = 0
111+
var childFDActions: posix_spawn_file_actions_t!
111112
let outputPipe: Int32 = 69
112113
let outerrPipe: Int32 = 70
113114

@@ -118,7 +119,6 @@ class LogTaskExecutor: TaskExecutor {
118119
posix_spawn_file_actions_destroy(&childFDActions)
119120
}
120121

121-
var childFDActions: posix_spawn_file_actions_t!
122122
posix_spawn_file_actions_init(&childFDActions)
123123
posix_spawn_file_actions_addopen(&childFDActions, outputPipe, stdoutLogPath, O_CREAT | O_TRUNC | O_WRONLY, ~0)
124124
posix_spawn_file_actions_addopen(&childFDActions, outerrPipe, stderrLogPath, O_CREAT | O_TRUNC | O_WRONLY, ~0)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Tests/.ruby-version

-1
This file was deleted.

0 commit comments

Comments
 (0)