From dc069ac52cfae3aba4cb1c2b9652833eea89320b Mon Sep 17 00:00:00 2001 From: Rob Amos Date: Sun, 14 Jul 2024 23:41:09 +1000 Subject: [PATCH] Update GitHub workflows to latest supported Xcode/Swift versions --- .github/workflows/docs.yml | 4 +- .github/workflows/ios-tests.yml | 58 +++++----------------------- .github/workflows/lint.yml | 2 +- .github/workflows/linux-tests.yml | 17 +------- .github/workflows/macos-tests.yml | 53 +++++-------------------- .github/workflows/tvos-tests.yml | 55 +++++--------------------- .github/workflows/visionos-tests.yml | 53 +++++++++++++++++++++++++ .github/workflows/watchos-tests.yml | 55 +++++--------------------- 8 files changed, 97 insertions(+), 200 deletions(-) create mode 100644 .github/workflows/visionos-tests.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 884bd597..c3dd4f51 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,12 +9,12 @@ on: - '**/*.swift' env: - DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer jobs: BuildWebsite: name: "Build Docs" - runs-on: macos-11.0 + runs-on: macos-latest steps: - name: 🛒 Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/ios-tests.yml b/.github/workflows/ios-tests.yml index 11bac092..230c1d91 100644 --- a/.github/workflows/ios-tests.yml +++ b/.github/workflows/ios-tests.yml @@ -23,50 +23,15 @@ jobs: - '.github/workflows/ios-tests.yml' - '**/*.swift' - ##################### - # macOS 11 Versions # - ##################### - - build-ios-macos-11-matrix: - name: iOS Metrix - macOS 11 - runs-on: macos-11.0 - if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: check-changes - strategy: - matrix: - xcode: [ "11.7", "12.4", "12.5.1", "13.0", "13.1", "13.2.1" ] - - env: - DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Build and Test - run: swift package generate-xcodeproj && xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=iOS Simulator,name=iPhone 8" - - build-ios-macos-11: - runs-on: ubuntu-latest - name: iOS Tests - macOS 11 - if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: build-ios-macos-11-matrix - steps: - - name: Check build matrix status - if: ${{ needs.build-ios-macos-11-matrix.result == 'failure' }} - run: exit 1 - - ##################### - # macOS 12 Versions # - ##################### - - build-ios-macos-12-matrix: - name: iOS Matrix - macOS 12 - runs-on: macos-12 + build-ios-matrix: + name: iOS Metrix if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} needs: check-changes strategy: matrix: - xcode: [ "13.1", "13.2.1", "13.3.1", "13.4.1", "14.0.1", "14.1", "14.2" ] + xcode: [ "15.4", "16.0" ] + os: [ macos-14, macos-14-large ] + runs-on: {{ $matrix.os }} env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer @@ -75,17 +40,14 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Build and Test - run: | - DEVICE_ID=`xcrun simctl list --json devices available iPhone | jq -r '.devices | to_entries | map(select(.value | add)) | sort_by(.key) | last.value | first.udid'` - swift package generate-xcodeproj - xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=iOS Simulator,id=$DEVICE_ID" + run: xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=iOS Simulator,name=Any iOS Simulator Device" - build-ios-macos-12: + build-ios: runs-on: ubuntu-latest - name: iOS Tests - macOS 12 + name: iOS Tests if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: build-ios-macos-12-matrix + needs: build-ios-matrix steps: - name: Check build matrix status - if: ${{ needs.build-ios-macos-12-matrix.result == 'failure' }} + if: ${{ needs.build-ios-matrix.result == 'failure' }} run: exit 1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index aa30719f..a88c38de 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: filters: | changed: - '.github/workflows/lint.yml' - - '..swiftformat' + - '.swiftformat' - '**/*.swift' Lint: diff --git a/.github/workflows/linux-tests.yml b/.github/workflows/linux-tests.yml index 36953b87..b501aba2 100644 --- a/.github/workflows/linux-tests.yml +++ b/.github/workflows/linux-tests.yml @@ -34,21 +34,8 @@ jobs: needs: check-changes strategy: matrix: - swift: [ "5.2.5", "5.3.3", "5.4.3", "5.5.3", "5.6.3", "5.7.3" ] - os: [ amazonlinux2, bionic, centos7, focal, jammy ] - exclude: - - swift: 5.2.5 - os: jammy - - swift: 5.3.3 - os: jammy - - swift: 5.4.3 - os: jammy - - swift: 5.5.3 - os: jammy - - swift: 5.6.3 - os: jammy - - swift: 5.7.3 - os: centos7 + swift: [ "5.10.1" ] + os: [ amazonlinux2, bookworm, centos7, focal, jammy, rhel-ubi9, mantic, noble, windowsservercore-ltsc2022 ] container: image: swift:${{ matrix.swift }}-${{ matrix.os }} diff --git a/.github/workflows/macos-tests.yml b/.github/workflows/macos-tests.yml index 78c92645..1a590357 100644 --- a/.github/workflows/macos-tests.yml +++ b/.github/workflows/macos-tests.yml @@ -23,18 +23,15 @@ jobs: - '.github/workflows/macos-tests.yml' - '**/*.swift' - ############ - # macOS 11 # - ############ - - build-macos-macos-11-matrix: - name: macOS Matrix - macOS 11 - runs-on: macos-11.0 + build-macos-matrix: + name: macOS Metrix if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} needs: check-changes strategy: matrix: - xcode: [ "11.7", "12.4", "12.5.1", "13.0", "13.1", "13.2.1" ] + xcode: [ "15.4", "16.0" ] + os: [ macos-14, macos-14-large ] + runs-on: {{ $matrix.os }} env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer @@ -45,44 +42,12 @@ jobs: - name: Build and Test run: swift test - build-macos-macos-11: - runs-on: ubuntu-latest - name: macOS Tests - macOS 11 - if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: build-macos-macos-11-matrix - steps: - - name: Check build matrix status - if: ${{ needs.build-macos-macos-11-matrix.result == 'failure' }} - run: exit 1 - - ############ - # macOS 12 # - ############ - - build-macos-macos-12-matrix: - name: macOS Matrix - macOS 12 - runs-on: macos-12 - if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: check-changes - strategy: - matrix: - xcode: [ "13.1", "13.2.1", "13.3.1", "13.4.1", "14.0.1", "14.1", "14.2" ] - - env: - DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Build and Test - run: swift - - build-macos-macos-12: + build-macos: runs-on: ubuntu-latest - name: macOS Tests - macOS 12 + name: macOS Tests if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: build-macos-macos-12-matrix + needs: build-macos-matrix steps: - name: Check build matrix status - if: ${{ needs.build-macos-macos-12-matrix.result == 'failure' }} + if: ${{ needs.build-macos-matrix.result == 'failure' }} run: exit 1 diff --git a/.github/workflows/tvos-tests.yml b/.github/workflows/tvos-tests.yml index 0fabb1f4..e426eb0e 100644 --- a/.github/workflows/tvos-tests.yml +++ b/.github/workflows/tvos-tests.yml @@ -23,50 +23,15 @@ jobs: - '.github/workflows/tvos-tests.yml' - '**/*.swift' - ##################### - # macOS 11 Versions # - ##################### - - build-tvos-macos-11-matrix: - name: tvOS Matrix - macOS 11 - runs-on: macos-11.0 - if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: check-changes - strategy: - matrix: - xcode: [ "11.7", "12.4", "12.5.1", "13.0", "13.1", "13.2.1" ] - - env: - DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Build and Test - run: swift package generate-xcodeproj && xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=tvOS Simulator,name=Apple TV 4K" - - build-tvos-macos-11: - runs-on: ubuntu-latest - name: tvOS Tests - macOS 11 - if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: build-tvos-macos-11-matrix - steps: - - name: Check build matrix status - if: ${{ needs.build-tvos-macos-11-matrix.result == 'failure' }} - run: exit 1 - - ##################### - # macOS 12 Versions # - ##################### - - build-tvos-macos-12-matrix: - name: tvOS Matrix - macOS 12 - runs-on: macos-12 + build-tvos-matrix: + name: tvOS Metrix if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} needs: check-changes strategy: matrix: - xcode: [ "13.1", "13.2.1", "13.3.1", "13.4.1", "14.0.1", "14.1", "14.2" ] + xcode: [ "15.4", "16.0" ] + os: [ macos-14, macos-14-large ] + runs-on: {{ $matrix.os }} env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer @@ -75,14 +40,14 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Build and Test - run: swift package generate-xcodeproj && xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=tvOS Simulator,name=Apple TV 4K (2nd generation)" + run: xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=tvOS Simulator,name=Any tvOS Simulator Device" - build-tvos-macos-12: + build-tvos: runs-on: ubuntu-latest - name: tvOS Tests - macOS 12 + name: tvOS Tests if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: build-tvos-macos-12-matrix + needs: build-tvos-matrix steps: - name: Check build matrix status - if: ${{ needs.build-tvos-macos-12-matrix.result == 'failure' }} + if: ${{ needs.build-tvos-matrix.result == 'failure' }} run: exit 1 diff --git a/.github/workflows/visionos-tests.yml b/.github/workflows/visionos-tests.yml new file mode 100644 index 00000000..152c187d --- /dev/null +++ b/.github/workflows/visionos-tests.yml @@ -0,0 +1,53 @@ +name: visionOS Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + check-changes: + name: Check for Changes + runs-on: ubuntu-latest + outputs: + changed: ${{ steps.filter.outputs.changed }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + changed: + - '.github/workflows/visionos-tests.yml' + - '**/*.swift' + + build-visionos-matrix: + name: visionOS Metrix + if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} + needs: check-changes + strategy: + matrix: + xcode: [ "15.4", "16.0" ] + os: [ macos-14, macos-14-large ] + runs-on: {{ $matrix.os }} + + env: + DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build and Test + run: xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=visionOS Simulator,name=Any visionOS Simulator Device" + + build-visionos: + runs-on: ubuntu-latest + name: visionOS Tests + if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} + needs: build-visionos-matrix + steps: + - name: Check build matrix status + if: ${{ needs.build-visionos-matrix.result == 'failure' }} + run: exit 1 diff --git a/.github/workflows/watchos-tests.yml b/.github/workflows/watchos-tests.yml index 561a1ed0..625e9c16 100644 --- a/.github/workflows/watchos-tests.yml +++ b/.github/workflows/watchos-tests.yml @@ -23,50 +23,15 @@ jobs: - '.github/workflows/watchos-tests.yml' - '**/*.swift' - ##################### - # macOS 11 Versions # - ##################### - - build-watchos-macos-11-matrix: - name: watchOS Matrix - macOS 11 - runs-on: macos-11.0 - if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: check-changes - strategy: - matrix: - xcode: [ "11.7", "12.4", "12.5.1", "13.0", "13.1", "13.2.1" ] - - env: - DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Build and Test - run: swift package generate-xcodeproj && xcrun xcodebuild build -scheme "Vexil-Package" -destination "generic/platform=watchos" - - build-watchos-macos-11: - runs-on: ubuntu-latest - name: watchOS Build - macOS 11 - if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: build-watchos-macos-11-matrix - steps: - - name: Check build matrix status - if: ${{ needs.build-watchos-macos-11-matrix.result == 'failure' }} - run: exit 1 - - ##################### - # macOS 12 Versions # - ##################### - - build-watchos-macos-12-matrix: - name: watchOS Matrix - macOS 12 - runs-on: macos-12 + build-watchos-matrix: + name: watchOS Metrix if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} needs: check-changes strategy: matrix: - xcode: [ "13.1", "13.2.1", "13.3.1", "13.4.1", "14.0.1", "14.1", "14.2" ] + xcode: [ "15.4", "16.0" ] + os: [ macos-14, macos-14-large ] + runs-on: {{ $matrix.os }} env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer @@ -75,14 +40,14 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Build and Test - run: swift package generate-xcodeproj && xcrun xcodebuild build -scheme "Vexil-Package" -destination "generic/platform=watchos" + run: xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=watchOS Simulator,name=Any watchOS Simulator Device" - build-watchos-macos-12: + build-watchos: runs-on: ubuntu-latest - name: watchOS Build - macOS 12 + name: watchOS Tests if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }} - needs: build-watchos-macos-12-matrix + needs: build-watchos-matrix steps: - name: Check build matrix status - if: ${{ needs.build-watchos-macos-12-matrix.result == 'failure' }} + if: ${{ needs.build-watchos-matrix.result == 'failure' }} run: exit 1