Skip to content

Commit 28433d9

Browse files
authored
Fix Windows support, expand GHA platform coverage (#51)
* Add Windows job to GitHub Actions workflow * Update ci.yml * Remove unused `cLocale` breaking the Windows build * Exclude benchmark product from Windows builds * Try using forked swift-benchmark * Build and test on Ubuntu * Switch to upstream `swift-benchmark` dependency * Use `MaxDesiatov/swift-windows-action` * Bump `swift-benchmark` to 0.1.1 * Reduce `Package.swift` diff * Remove redundant whitespace * Request `macos-11` GHA agents explicitly * Test with multiple Swift versions on macOS * Quote Xcode versions because YAML is awful
1 parent 5cae667 commit 28433d9

File tree

4 files changed

+32
-17
lines changed

4 files changed

+32
-17
lines changed

.github/workflows/ci.yml

+27-4
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ on:
99
- '*'
1010

1111
jobs:
12-
tests:
13-
runs-on: macOS-latest
12+
macos_tests:
13+
runs-on: macos-11
1414
strategy:
1515
matrix:
1616
xcode:
17-
- 11.7
18-
- 12.3
17+
- "11.7" # Latest Xcode with Swift 5.2
18+
- "12.4" # Swift 5.3
19+
- "12.5" # Swift 5.4
20+
- "13.0" # Swift 5.5
1921
command:
2022
- test
2123
- benchmarks
@@ -27,3 +29,24 @@ jobs:
2729
run: system_profiler SPHardwareDataType
2830
- name: Run ${{ matrix.command }}
2931
run: make ${{ matrix.command }}
32+
33+
ubuntu_tests:
34+
strategy:
35+
matrix:
36+
os: [ubuntu-18.04, ubuntu-20.04]
37+
38+
runs-on: ${{ matrix.os }}
39+
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: Build
43+
run: swift build
44+
- name: Run tests
45+
run: swift test
46+
47+
windows_tests:
48+
runs-on: windows-2019
49+
50+
steps:
51+
- uses: actions/checkout@v2
52+
- uses: MaxDesiatov/swift-windows-action@v1

Package.resolved

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
"repositoryURL": "https://github.com/apple/swift-argument-parser",
77
"state": {
88
"branch": null,
9-
"revision": "92646c0cdbaca076c8d3d0207891785b3379cbff",
10-
"version": "0.3.1"
9+
"revision": "6b2aa2748a7881eebb9f84fb10c01293e15b52ca",
10+
"version": "0.5.0"
1111
}
1212
},
1313
{
1414
"package": "Benchmark",
1515
"repositoryURL": "https://github.com/google/swift-benchmark",
1616
"state": {
1717
"branch": null,
18-
"revision": "8e0ef8bb7482ab97dcd2cd1d6855bd38921c345d",
19-
"version": "0.1.0"
18+
"revision": "a0564bf88df5f94eec81348a2f089494c6b28d80",
19+
"version": "0.1.1"
2020
}
2121
}
2222
]

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let package = Package(
1111
)
1212
],
1313
dependencies: [
14-
.package(name: "Benchmark", url: "https://github.com/google/swift-benchmark", from: "0.1.0")
14+
.package(name: "Benchmark", url: "https://github.com/google/swift-benchmark", from: "0.1.1")
1515
],
1616
targets: [
1717
.target(

Sources/Parsing/Parsers/Double.swift

-8
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,3 @@ extension Collection where SubSequence == Self, Element == UTF8.CodeUnit {
290290
return original[..<self.startIndex]
291291
}
292292
}
293-
294-
#if os(Windows)
295-
@usableFromInline
296-
let cLocale: locale_t? = _create_locale(LC_ALL, "C")
297-
#else
298-
@usableFromInline
299-
let cLocale: locale_t? = nil
300-
#endif

0 commit comments

Comments
 (0)