Skip to content

Commit

Permalink
[CI] Add Swift 5.9 CI jobs (#403)
Browse files Browse the repository at this point in the history
* [CI] Add Swift 5.9 CI jobs

* fixup! [CI] Add Swift 5.9 CI jobs

* xcodebuild_Ventura

* Xcode_Ventura
  • Loading branch information
jpsim committed Oct 15, 2023
1 parent a109024 commit 9058878
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
Linux:
strategy:
matrix:
tag: ['5.4', '5.5', '5.6', '5.7', '5.8']
tag: ['5.4', '5.5', '5.6', '5.7', '5.8', '5.9']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}-focal
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
CMake:
strategy:
matrix:
xcode_version: ['14.2', '14.3']
xcode_version: ['14.2', '14.3', '15.0']
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
Expand All @@ -42,7 +42,7 @@ jobs:
CMake_Linux:
strategy:
matrix:
tag: ['5.6', '5.7', '5.8']
tag: ['5.6', '5.7', '5.8', '5.9']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/jazzy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ on:

jobs:
Jazzy:
runs-on: macos-12
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app
DEVELOPER_DIR: /Applications/Xcode_15.0.app
steps:
- uses: actions/checkout@v3
- name: Install SourceKitten
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
SwiftLint:
runs-on: ubuntu-latest
container:
image: ghcr.io/realm/swiftlint:0.51.0
image: ghcr.io/realm/swiftlint:0.53.0
steps:
- uses: actions/checkout@v3
- name: SwiftLint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swiftlint_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
Analyze:
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.app
DEVELOPER_DIR: /Applications/Xcode_15.0.app
steps:
- uses: actions/checkout@v3
- name: Generate xcodebuild.log
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/swiftpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,21 @@ jobs:
- run: swift -version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel

Xcode_Ventura:
strategy:
matrix:
xcode_version: ['14.3', '15.0']
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v3
- run: swift -version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
- name: Code Coverage
if: matrix.xcode_version == '14.2'
if: matrix.xcode_version == '15.0'
run: |
swift test --enable-code-coverage
xcrun llvm-cov export -format="lcov" .build/debug/YamsPackageTests.xctest/Contents/MacOS/YamsPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
Expand All @@ -62,7 +75,7 @@ jobs:
Linux:
strategy:
matrix:
tag: ['5.4', '5.5', '5.6', '5.7']
tag: ['5.4', '5.5', '5.6', '5.7', '5.8', '5.9']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/xcodebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,37 @@ jobs:
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} build -sdk watchsimulator | xcpretty
shell: bash

xcodebuild_Ventura:
strategy:
matrix:
xcode:
- version: '14.3'
- version: '15.0'
xcode_flags: ['-scheme Yams -project Yams.xcodeproj']
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode.version }}.app
steps:
- uses: actions/checkout@v3
- run: xcodebuild -version
- name: macOS with UTF16
if: always()
run: YAMS_DEFAULT_ENCODING=UTF16 xcodebuild ${{ matrix.xcode_flags }} test | xcpretty
shell: bash
- name: macOS with UTF8
if: always()
run: YAMS_DEFAULT_ENCODING=UTF8 xcodebuild ${{ matrix.xcode_flags }} test | xcpretty
shell: bash
- name: iPhone Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} test -sdk iphonesimulator -destination "name=iPhone 8" | xcpretty
shell: bash
- name: Apple TV Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} test -sdk appletvsimulator -destination "name=Apple TV 4K (2nd generation)" | xcpretty
shell: bash
- name: watchOS Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} build -sdk watchsimulator | xcpretty
shell: bash
13 changes: 0 additions & 13 deletions Tests/YamsTests/EncoderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -590,14 +590,6 @@ private struct Address: Codable, Equatable {
let zipCode: Int
let country: String

init(street: String, city: String, state: String, zipCode: Int, country: String) {
self.street = street
self.city = city
self.state = state
self.zipCode = zipCode
self.country = country
}

static func == (_ lhs: Address, _ rhs: Address) -> Bool {
return lhs.street == rhs.street &&
lhs.city == rhs.city &&
Expand Down Expand Up @@ -685,11 +677,6 @@ private struct Company: Codable, Equatable {
let address: Address
var employees: [Employee]

init(address: Address, employees: [Employee]) {
self.address = address
self.employees = employees
}

static func == (_ lhs: Company, _ rhs: Company) -> Bool {
return lhs.address == rhs.address && lhs.employees == rhs.employees
}
Expand Down

0 comments on commit 9058878

Please sign in to comment.