Skip to content

Move CI to macos-14 and use Xcode 14.2. #249

Move CI to macos-14 and use Xcode 14.2.

Move CI to macos-14 and use Xcode 14.2. #249

Workflow file for this run

name: SwiftPM
on:
push:
branches: [ main ]
paths:
- 'Sources/**'
- 'SwiftPMTests/**'
- 'UnitTests/**'
- 'Package*.swift'
- '.github/workflows/swiftpm.yml'
pull_request:
branches: [ main ]
paths:
- 'Sources/**'
- 'SwiftPMTests/**'
- 'UnitTests/**'
- 'Package*.swift'
- '.github/workflows/swiftpm.yml'
schedule:
# Run the first and fifteenth of every month at 5:12 UTC
- cron: '12 5 1,15 * *'
# Also allow manual triggering from the github UX to revalidate things.
workflow_dispatch:
jobs:
swift:
# The swift command line only support build/testing for macOS on.
runs-on: macos-14
strategy:
fail-fast: false
matrix:
CONFIGURATION: ["debug", "release"]
steps:
# The "macos-14" image defaults to 15.0.1, select the newer Xcode.
- name: Xcode version
run: sudo xcode-select -switch /Applications/Xcode_15.2.app
- uses: actions/checkout@v4
- name: Build and Test
run: |
set -eu
swift build --configuration ${{ matrix.CONFIGURATION }}
swift test --configuration ${{ matrix.CONFIGURATION }}
xcodebuild:
# Job(s) to build for all the platforms to ensure that is working and the
# tests are passing.
runs-on: macos-14
strategy:
fail-fast: false
matrix:
PLATFORM: ["ios", "macos", "tvos", "watchos"]
CONFIGURATION: ["Debug", "Release"]
steps:
# The "macos-14" image defaults to 15.0.1, select the newer Xcode.
- name: Xcode version
run: sudo xcode-select -switch /Applications/Xcode_15.2.app
- uses: actions/checkout@v4
- name: Build and Test
run: |
set -eu
case "${{matrix.PLATFORM}}" in
ios)
DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=latest"
;;
macos)
DESTINATION="platform=macOS"
;;
tvos)
DESTINATION="platform=tvOS Simulator,name=Apple TV,OS=latest"
;;
watchos)
DESTINATION="platform=WatchOS Simulator,name=Apple Watch Series 7 (45mm),OS=latest"
;;
esac
set -o pipefail
xcodebuild \
-scheme GTMSessionFetcher-Package \
-configuration ${{ matrix.CONFIGURATION }} \
-destination "${DESTINATION}" \
build test \
| xcpretty