Skip to content

Commit 2823463

Browse files
authored
Merge pull request #39 from swhitty/iOS13+
iOS13+
2 parents 18564c0 + 7302a1a commit 2823463

File tree

9 files changed

+118
-123
lines changed

9 files changed

+118
-123
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
xcode_15_1:
10-
runs-on: macos-13
9+
xcode_15_3:
10+
runs-on: macos-14
1111
env:
12-
DEVELOPER_DIR: /Applications/Xcode_15.1.app/Contents/Developer
12+
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
- name: Version
1717
run: swift --version
1818
- name: Build
@@ -22,17 +22,32 @@ jobs:
2222
- name: Gather code coverage
2323
run: xcrun llvm-cov export -format="lcov" .build/debug/SwiftDrawPackageTests.xctest/Contents/MacOS/SwiftDrawPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage_report.lcov
2424
- name: Upload Coverage
25-
uses: codecov/codecov-action@v3
25+
uses: codecov/codecov-action@v4
2626
with:
27+
token: ${{ secrets.CODECOV_TOKEN }}
2728
files: ./coverage_report.lcov
2829

30+
xcode_15_2:
31+
runs-on: macos-14
32+
env:
33+
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
- name: Version
38+
run: swift --version
39+
- name: Build
40+
run: swift build --build-tests
41+
- name: Test
42+
run: swift test --skip-build
43+
2944
xcode_14_3:
3045
runs-on: macos-13
3146
env:
3247
DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer
3348
steps:
3449
- name: Checkout
35-
uses: actions/checkout@v3
50+
uses: actions/checkout@v4
3651
- name: Version
3752
run: swift --version
3853
- name: Build
@@ -45,7 +60,7 @@ jobs:
4560
container: swift:5.7
4661
steps:
4762
- name: Checkout
48-
uses: actions/checkout@v3
63+
uses: actions/checkout@v4
4964
- name: Version
5065
run: swift --version
5166
- name: Build
@@ -58,7 +73,20 @@ jobs:
5873
container: swift:5.9
5974
steps:
6075
- name: Checkout
61-
uses: actions/checkout@v3
76+
uses: actions/checkout@v4
77+
- name: Version
78+
run: swift --version
79+
- name: Build
80+
run: swift build --build-tests
81+
- name: Test
82+
run: swift test --skip-build
83+
84+
linux_5_10:
85+
runs-on: ubuntu-latest
86+
container: swift:5.10
87+
steps:
88+
- name: Checkout
89+
uses: actions/checkout@v4
6290
- name: Version
6391
run: swift --version
6492
- name: Build

.swiftpm/SwiftDraw.xctestplan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"configurations" : [
33
{
4-
"id" : "1AF01B10-5ADB-4F60-8B2E-FB30A2CC2F79",
4+
"id" : "B46FBA9F-0EC4-486D-8336-66AB23577319",
55
"name" : "Test Scheme Action",
66
"options" : {
77

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55
let package = Package(
66
name: "SwiftDraw",
77
platforms: [
8-
.iOS(.v12), .macOS(.v10_14)
8+
.iOS(.v13), .macOS(.v10_15)
99
],
1010
products: [
1111
// Products define the executables and libraries produced by a package, and make them visible to other packages.

SwiftDraw/CommandLine.Configuration.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,10 @@ extension CommandLine {
180180
}
181181

182182
let scanner = Scanner(string: value)
183-
var width: Int32 = 0
184-
var height: Int32 = 0
185183
guard
186-
scanner.scanInt32(&width),
187-
scanner.scanString("x", into: nil),
188-
scanner.scanInt32(&height),
184+
let width = scanner.scanInt32(),
185+
let _ = scanner.scanString("x"),
186+
let height = scanner.scanInt32(),
189187
width > 0, height > 0 else {
190188
throw Error.invalid
191189
}

0 commit comments

Comments
 (0)