Skip to content

Commit

Permalink
Update GitHub workflows to latest supported Xcode/Swift versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bok- committed Jul 14, 2024
1 parent 6d6e556 commit dc069ac
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 200 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
58 changes: 10 additions & 48 deletions .github/workflows/ios-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
filters: |
changed:
- '.github/workflows/lint.yml'
- '..swiftformat'
- '.swiftformat'
- '**/*.swift'
Lint:
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/linux-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
53 changes: 9 additions & 44 deletions .github/workflows/macos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
55 changes: 10 additions & 45 deletions .github/workflows/tvos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
53 changes: 53 additions & 0 deletions .github/workflows/visionos-tests.yml
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit dc069ac

Please sign in to comment.