Move to actions/checkout@v5. #300
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SwiftPM | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'Sources/**' | |
- 'UnitTests/**' | |
- 'Package*.swift' | |
- 'SwiftPMTests/**' | |
- '.github/workflows/swiftpm.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'Sources/**' | |
- 'UnitTests/**' | |
- 'Package*.swift' | |
- 'SwiftPMTests/**' | |
- '.github/workflows/swiftpm.yml' | |
schedule: | |
# Run the first and fifteenth of every month at 6:12 UTC | |
- cron: '12 6 1,15 * *' | |
jobs: | |
swift: | |
# The swift command line only support build/testing for macOS on. | |
runs-on: macos-15 | |
strategy: | |
fail-fast: false | |
matrix: | |
CONFIGURATION: ["debug", "release"] | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Select Xcode Version | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 'latest-stable' | |
- name: Build and Test Library | |
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-15 | |
strategy: | |
fail-fast: false | |
matrix: | |
PLATFORM: ["ios", "macos", "tvos", "visionos", "watchos"] | |
CONFIGURATION: ["Debug", "Release"] | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Select Xcode Version | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 'latest-stable' | |
- name: Build and Test Library | |
run: | | |
set -eu | |
case "${{matrix.PLATFORM}}" in | |
ios) | |
DESTINATION="platform=iOS Simulator,name=iPhone 16,OS=latest" | |
;; | |
macos) | |
DESTINATION="platform=macOS" | |
;; | |
tvos) | |
DESTINATION="platform=tvOS Simulator,name=Apple TV,OS=latest" | |
;; | |
visionos) | |
# As of Aug 15, 2025, "latest" was failing as it matched both the | |
# beta and GM, use explict GM. | |
DESTINATION="platform=visionOS Simulator,name=Apple Vision Pro,OS=2.5" | |
;; | |
watchos) | |
DESTINATION="platform=WatchOS Simulator,name=Apple Watch Series 10 (46mm),OS=latest" | |
;; | |
esac | |
xcodebuild \ | |
-scheme GoogleAPIClientForREST-Package \ | |
-configuration ${{ matrix.CONFIGURATION }} \ | |
-destination "${DESTINATION}" \ | |
build test |