Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 36 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
workflow_dispatch:

jobs:
xcode_15_1:
runs-on: macos-13
xcode_15_3:
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Version
run: swift --version
- name: Build
Expand All @@ -22,17 +22,32 @@ jobs:
- name: Gather code coverage
run: xcrun llvm-cov export -format="lcov" .build/debug/SwiftDrawPackageTests.xctest/Contents/MacOS/SwiftDrawPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage_report.lcov
- name: Upload Coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage_report.lcov

xcode_15_2:
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Version
run: swift --version
- name: Build
run: swift build --build-tests
- name: Test
run: swift test --skip-build

xcode_14_3:
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Version
run: swift --version
- name: Build
Expand All @@ -45,7 +60,7 @@ jobs:
container: swift:5.7
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Version
run: swift --version
- name: Build
Expand All @@ -58,7 +73,20 @@ jobs:
container: swift:5.9
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Version
run: swift --version
- name: Build
run: swift build --build-tests
- name: Test
run: swift test --skip-build

linux_5_10:
runs-on: ubuntu-latest
container: swift:5.10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Version
run: swift --version
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .swiftpm/SwiftDraw.xctestplan
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"configurations" : [
{
"id" : "1AF01B10-5ADB-4F60-8B2E-FB30A2CC2F79",
"id" : "B46FBA9F-0EC4-486D-8336-66AB23577319",
"name" : "Test Scheme Action",
"options" : {

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription
let package = Package(
name: "SwiftDraw",
platforms: [
.iOS(.v12), .macOS(.v10_14)
.iOS(.v13), .macOS(.v10_15)
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
Expand Down
8 changes: 3 additions & 5 deletions SwiftDraw/CommandLine.Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,10 @@ extension CommandLine {
}

let scanner = Scanner(string: value)
var width: Int32 = 0
var height: Int32 = 0
guard
scanner.scanInt32(&width),
scanner.scanString("x", into: nil),
scanner.scanInt32(&height),
let width = scanner.scanInt32(),
let _ = scanner.scanString("x"),
let height = scanner.scanInt32(),
width > 0, height > 0 else {
throw Error.invalid
}
Expand Down
Loading