From 23903e10c3ae693d3a1a90d4bfce88f658072bd9 Mon Sep 17 00:00:00 2001 From: Rachel Brindle Date: Mon, 16 Dec 2024 20:09:50 -0800 Subject: [PATCH] Update CI actions (#1184) * Bump CI actions Github retired macos 12 runners, so upgrade to more recent versions * Exclude the MixedSwiftTestingXCTestSupport test from building on non-darwin platforms * Specify the container to build documentation on --- .github/workflows/carthage.yml | 2 +- .github/workflows/ci-swiftpm.yml | 14 ++++++++------ .github/workflows/ci-xcode.yml | 16 ++++++++-------- .github/workflows/cocoapods.yml | 2 +- .github/workflows/documentation.yml | 1 + .github/workflows/release.yml | 4 ++-- Tests/NimbleTests/SwiftTestingSupportTest.swift | 3 +++ 7 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.github/workflows/carthage.yml b/.github/workflows/carthage.yml index 600eadda3..ba4f8d5e4 100644 --- a/.github/workflows/carthage.yml +++ b/.github/workflows/carthage.yml @@ -13,7 +13,7 @@ on: jobs: carthage: name: Carthage Build - runs-on: macos-12 + runs-on: macos-14 steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 diff --git a/.github/workflows/ci-swiftpm.yml b/.github/workflows/ci-swiftpm.yml index 30290ce7e..dcb26af60 100644 --- a/.github/workflows/ci-swiftpm.yml +++ b/.github/workflows/ci-swiftpm.yml @@ -11,24 +11,24 @@ on: - "*" jobs: - swiftpm_darwin_monterey: + swiftpm_darwin_ventura: name: SwiftPM, Darwin, Xcode ${{ matrix.xcode }} - runs-on: macos-12 + runs-on: macos-13 strategy: matrix: - xcode: ["14.0.1", "14.1", "14.2"] + xcode: ["14.3.1"] env: DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app" steps: - uses: actions/checkout@v4 - run: ./test swiftpm - swiftpm_darwin_ventura: + swiftpm_darwin_sonoma: name: SwiftPM, Darwin, Xcode ${{ matrix.xcode }} - runs-on: macos-13 + runs-on: macos-14 strategy: matrix: - xcode: ["14.3.1"] + xcode: ["15.3", "16.1"] env: DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app" steps: @@ -43,6 +43,8 @@ jobs: container: - swift:5.7 - swift:5.8 + - swift:5.9 + - swift:6.0 # - swiftlang/swift:nightly fail-fast: false container: ${{ matrix.container }} diff --git a/.github/workflows/ci-xcode.yml b/.github/workflows/ci-xcode.yml index 8e55af81b..fc80353cf 100644 --- a/.github/workflows/ci-xcode.yml +++ b/.github/workflows/ci-xcode.yml @@ -11,12 +11,12 @@ on: - "*" jobs: - xcode_monterey: + xcode_ventura: name: Xcode ${{ matrix.xcode }} (Xcode Project) - runs-on: macos-12 + runs-on: macos-13 strategy: matrix: - xcode: ["14.0.1", "14.1", "14.2"] + xcode: ["14.3.1"] fail-fast: false env: DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app" @@ -27,12 +27,12 @@ jobs: - run: ./test tvos - run: ./test watchos - xcode_ventura: + xcode_sonoma: name: Xcode ${{ matrix.xcode }} (Xcode Project) - runs-on: macos-13 + runs-on: macos-14 strategy: matrix: - xcode: ["14.3.1"] + xcode: ["15.4", "16.1"] fail-fast: false env: DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app" @@ -45,10 +45,10 @@ jobs: xcode_spm: name: Xcode ${{ matrix.xcode }} (Swift Package) - runs-on: macos-12 + runs-on: macos-14 strategy: matrix: - xcode: ["14.0.1"] + xcode: ["16.1"] fail-fast: false env: DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app" diff --git a/.github/workflows/cocoapods.yml b/.github/workflows/cocoapods.yml index 65fae6e9e..6310578ba 100644 --- a/.github/workflows/cocoapods.yml +++ b/.github/workflows/cocoapods.yml @@ -13,7 +13,7 @@ on: jobs: cocoapods: name: CocoaPods Lint - runs-on: macos-12 + runs-on: macos-14 steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 82fcb3553..92616f2d4 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -15,6 +15,7 @@ permissions: jobs: build-documentation: runs-on: ubuntu-latest + container: swift:latest steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47aedb845..eeee90184 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,10 +7,10 @@ on: jobs: carthage_archive: name: Darwin, Xcode 14.0 - runs-on: macos-12 + runs-on: macos-14 strategy: matrix: - xcode: ["14.0.1"] + xcode: ["16.1"] env: DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app" steps: diff --git a/Tests/NimbleTests/SwiftTestingSupportTest.swift b/Tests/NimbleTests/SwiftTestingSupportTest.swift index d54a9346a..a30bc0c4f 100644 --- a/Tests/NimbleTests/SwiftTestingSupportTest.swift +++ b/Tests/NimbleTests/SwiftTestingSupportTest.swift @@ -17,6 +17,8 @@ import XCTest } } +#if canImport(Darwin) +// the open source version of XCTest doesn't include `XCTExpectFailure`. class MixedSwiftTestingXCTestSupport: XCTestCase { func testAlsoRecordsErrorsToXCTest() { XCTExpectFailure("This should fail") @@ -29,5 +31,6 @@ class MixedSwiftTestingXCTestSupport: XCTestCase { try require(false).to(beTrue()) } } +#endif #endif