diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d2d1f2be5..c27816dd89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,33 +10,33 @@ on: workflow_dispatch: jobs: - macos_tests: - runs-on: macos-12 + macos: + runs-on: macos-14 strategy: matrix: xcode: - - "14.2" # Swift 5.7.2 - command: - - test - # - benchmarks + - '16.0' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Select Xcode ${{ matrix.xcode }} run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - name: System run: system_profiler SPHardwareDataType - - name: Run ${{ matrix.command }} - run: make ${{ matrix.command }} + - name: Build + run: swift build + - name: Run tests + run: swift test - ubuntu_tests: + linux: strategy: matrix: - os: [ubuntu-20.04] - + os: [ubuntu-latest] + swift: + - '6.0' runs-on: ${{ matrix.os }} - + container: swift:${{ matrix.swift }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build run: swift build - name: Run tests diff --git a/Sources/swift-parsing-benchmark/JSON.swift b/Sources/swift-parsing-benchmark/JSON.swift index 18d4921d67..8227de22cb 100644 --- a/Sources/swift-parsing-benchmark/JSON.swift +++ b/Sources/swift-parsing-benchmark/JSON.swift @@ -70,7 +70,8 @@ let jsonSuite = BenchmarkSuite(name: "JSON") { suite in struct JSONObject: ParserPrinter { var body: some ParserPrinter { "{".utf8 - Many(into: [String: JSONValue.Output]()) { object, pair in + Many(into: [String: JSONValue.Output]()) { + (object: inout [String: JSONValue.Output], pair: (String, JSONValue.Output)) in let (name, value) = pair object[name] = value } decumulator: { object in diff --git a/Tests/ParsingTests/FromSubstringTests.swift b/Tests/ParsingTests/FromSubstringTests.swift index a1bd95552e..2e4f8cac19 100644 --- a/Tests/ParsingTests/FromSubstringTests.swift +++ b/Tests/ParsingTests/FromSubstringTests.swift @@ -1,6 +1,7 @@ import Parsing import XCTest +@available(*, deprecated) final class FromSubstringTests: XCTestCase { func testUTF8View() { let p = Parse(input: Substring.UTF8View.self) { diff --git a/Tests/ParsingTests/OneOfTests.swift b/Tests/ParsingTests/OneOfTests.swift index b0d829a53b..9c77ec68d7 100644 --- a/Tests/ParsingTests/OneOfTests.swift +++ b/Tests/ParsingTests/OneOfTests.swift @@ -271,7 +271,8 @@ final class OneOfTests: XCTestCase { struct JSONObject: ParserPrinter { var body: some ParserPrinter { "{".utf8 - Many(into: [String: JSONValue.Output]()) { object, pair in + Many(into: [String: JSONValue.Output]()) { + (object: inout [String: JSONValue.Output], pair: (String, JSONValue.Output)) in let (name, value) = pair object[name] = value } decumulator: { object in