Skip to content

Commit fcbe6eb

Browse files
authored
Merge pull request #18 from dastrobu/build-fix
Build fix
2 parents f7e32fa + 6d6bb6a commit fcbe6eb

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
matrix:
1414
swift-version:
1515
- "5.5"
16-
- "5.4"
17-
- "5.3"
1816
runs-on: macos-latest
1917
steps:
2018
- uses: actions/checkout@v2
@@ -27,11 +25,18 @@ jobs:
2725
matrix:
2826
swift-version:
2927
- "5.5"
28+
- "5.4"
29+
- "5.3"
30+
- "5.2"
31+
- "5.1"
3032
- "5.0"
31-
- "4"
32-
- "4.0"
3333
runs-on: ubuntu-latest
3434
container: swift:${{ matrix.swift-version }}
3535
steps:
3636
- uses: actions/checkout@v2
3737
- run: swift test
38+
ios-build:
39+
runs-on: macos-latest
40+
steps:
41+
- uses: actions/checkout@v2
42+
- run: xcodebuild -scheme vincenty -destination 'platform=iOS Simulator,name=iPhone 13'

Sources/vincenty/vincenty.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#if os(macOS) || os(iOS)
1+
#if canImport(Darwin)
22
import Darwin
3-
#elseif os(Linux)
3+
#elseif canImport(Glibc)
44
import Glibc
55
#endif
66

@@ -41,7 +41,7 @@ public func distance(_ x: (lat: Double, lon: Double),
4141
tol: Double = 1e-12,
4242
maxIter: UInt = 200,
4343
ellipsoid: (a: Double, f: Double) = wgs84) throws -> Double {
44-
try solveInverse(x, y, tol: tol, maxIter: maxIter, ellipsoid: ellipsoid).distance;
44+
return try solveInverse(x, y, tol: tol, maxIter: maxIter, ellipsoid: ellipsoid).distance;
4545
}
4646

4747

Tests/vincentyTests/XCTestManifests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import XCTest
22

3-
#if !os(macOS)
3+
#if os(Linux)
44
public func allTests() -> [XCTestCaseEntry] {
55
return [
66
testCase(VincentyTests.allTests),

0 commit comments

Comments
 (0)