Skip to content

Commit

Permalink
Merge branch 'main' into prefix-faster
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis authored Oct 9, 2024
2 parents d3fa32f + e1e155c commit a6ae32c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Sources/swift-parsing-benchmark/JSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ let jsonSuite = BenchmarkSuite(name: "JSON") { suite in
struct JSONObject: ParserPrinter {
var body: some ParserPrinter<Substring.UTF8View, [String: JSONValue.Output]> {
"{".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
Expand Down
1 change: 1 addition & 0 deletions Tests/ParsingTests/FromSubstringTests.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Parsing
import XCTest

@available(*, deprecated)
final class FromSubstringTests: XCTestCase {
func testUTF8View() {
let p = Parse(input: Substring.UTF8View.self) {
Expand Down
3 changes: 2 additions & 1 deletion Tests/ParsingTests/OneOfTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ final class OneOfTests: XCTestCase {
struct JSONObject: ParserPrinter {
var body: some ParserPrinter<Substring.UTF8View, [String: JSONValue.Output]> {
"{".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
Expand Down

0 comments on commit a6ae32c

Please sign in to comment.