From f70883806f88396efe8e81cc2665ec1a60e4e8a9 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Sun, 15 Oct 2023 15:19:58 -0400 Subject: [PATCH 1/4] [CI] Add Swift 5.9 CI jobs --- .github/workflows/bazel.yml | 2 +- .github/workflows/cmake.yml | 4 ++-- .github/workflows/jazzy.yml | 4 ++-- .github/workflows/pod_lib_lint.yml | 2 +- .github/workflows/swiftlint.yml | 2 +- .github/workflows/swiftlint_analyze.yml | 2 +- .github/workflows/swiftpm.yml | 4 ++-- .github/workflows/xcodebuild.yml | 1 + 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index c8f72a35..492761b7 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -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 diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e202bac1..3ef1bc47 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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 @@ -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 }} diff --git a/.github/workflows/jazzy.yml b/.github/workflows/jazzy.yml index a271cc67..1c04a156 100644 --- a/.github/workflows/jazzy.yml +++ b/.github/workflows/jazzy.yml @@ -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 diff --git a/.github/workflows/pod_lib_lint.yml b/.github/workflows/pod_lib_lint.yml index 9171a281..9aa53876 100644 --- a/.github/workflows/pod_lib_lint.yml +++ b/.github/workflows/pod_lib_lint.yml @@ -22,7 +22,7 @@ jobs: name: pod lib lint runs-on: macos-13 env: - DEVELOPER_DIR: /Applications/Xcode_14.3.app + DEVELOPER_DIR: /Applications/Xcode_15.0.app steps: - uses: actions/checkout@v3 - run: bundle install --path vendor/bundle diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml index 5f892216..95355a16 100644 --- a/.github/workflows/swiftlint.yml +++ b/.github/workflows/swiftlint.yml @@ -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 diff --git a/.github/workflows/swiftlint_analyze.yml b/.github/workflows/swiftlint_analyze.yml index 5dda1d50..887e008d 100644 --- a/.github/workflows/swiftlint_analyze.yml +++ b/.github/workflows/swiftlint_analyze.yml @@ -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 diff --git a/.github/workflows/swiftpm.yml b/.github/workflows/swiftpm.yml index f872afa4..ad5ddb54 100644 --- a/.github/workflows/swiftpm.yml +++ b/.github/workflows/swiftpm.yml @@ -40,7 +40,7 @@ jobs: Xcode_Monterey: strategy: matrix: - xcode_version: ['13.3.1', '13.4', '14.0.1', '14.1', '14.2'] + xcode_version: ['13.3.1', '13.4', '14.0.1', '14.1', '14.2', '14.3', '15.0'] runs-on: macos-12 env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app @@ -62,7 +62,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 }} diff --git a/.github/workflows/xcodebuild.yml b/.github/workflows/xcodebuild.yml index 2e064f0d..d20d76b4 100644 --- a/.github/workflows/xcodebuild.yml +++ b/.github/workflows/xcodebuild.yml @@ -66,6 +66,7 @@ jobs: - version: '13.4' - version: '14.0.1' - version: '14.2' + - version: '14.3' xcode_flags: ['-scheme Yams -project Yams.xcodeproj'] runs-on: macos-12 env: From dd0b363b1923314daebbfa39171a924c2411216d Mon Sep 17 00:00:00 2001 From: JP Simard Date: Sun, 15 Oct 2023 15:21:42 -0400 Subject: [PATCH 2/4] fixup! [CI] Add Swift 5.9 CI jobs --- Tests/YamsTests/EncoderTests.swift | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Tests/YamsTests/EncoderTests.swift b/Tests/YamsTests/EncoderTests.swift index ce6d5d67..2eaa2269 100644 --- a/Tests/YamsTests/EncoderTests.swift +++ b/Tests/YamsTests/EncoderTests.swift @@ -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 && @@ -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 } From 56eb950ec435ca6130869e8473f7c91e461fb0f7 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Sun, 15 Oct 2023 15:55:24 -0400 Subject: [PATCH 3/4] xcodebuild_Ventura --- .github/workflows/xcodebuild.yml | 35 +++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/.github/workflows/xcodebuild.yml b/.github/workflows/xcodebuild.yml index d20d76b4..6d16628d 100644 --- a/.github/workflows/xcodebuild.yml +++ b/.github/workflows/xcodebuild.yml @@ -66,7 +66,6 @@ jobs: - version: '13.4' - version: '14.0.1' - version: '14.2' - - version: '14.3' xcode_flags: ['-scheme Yams -project Yams.xcodeproj'] runs-on: macos-12 env: @@ -94,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 From fe23eb983795301b57e38ffc8721c9b7011f2d83 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Sun, 15 Oct 2023 16:23:58 -0400 Subject: [PATCH 4/4] Xcode_Ventura --- .github/workflows/pod_lib_lint.yml | 2 +- .github/workflows/swiftpm.yml | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pod_lib_lint.yml b/.github/workflows/pod_lib_lint.yml index 9aa53876..9171a281 100644 --- a/.github/workflows/pod_lib_lint.yml +++ b/.github/workflows/pod_lib_lint.yml @@ -22,7 +22,7 @@ jobs: name: pod lib lint runs-on: macos-13 env: - DEVELOPER_DIR: /Applications/Xcode_15.0.app + DEVELOPER_DIR: /Applications/Xcode_14.3.app steps: - uses: actions/checkout@v3 - run: bundle install --path vendor/bundle diff --git a/.github/workflows/swiftpm.yml b/.github/workflows/swiftpm.yml index ad5ddb54..8fd97095 100644 --- a/.github/workflows/swiftpm.yml +++ b/.github/workflows/swiftpm.yml @@ -40,7 +40,7 @@ jobs: Xcode_Monterey: strategy: matrix: - xcode_version: ['13.3.1', '13.4', '14.0.1', '14.1', '14.2', '14.3', '15.0'] + xcode_version: ['13.3.1', '13.4', '14.0.1', '14.1', '14.2'] runs-on: macos-12 env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app @@ -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