Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI #355

Merged
merged 6 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
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
stephencelis marked this conversation as resolved.
Show resolved Hide resolved
swift:
- '6'
stephencelis marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ${{ matrix.os }}

container: swift:${{ matrix.swift }}
stephencelis marked this conversation as resolved.
Show resolved Hide resolved
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