-
Notifications
You must be signed in to change notification settings - Fork 314
77 lines (73 loc) · 2.13 KB
/
swiftpm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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-14
strategy:
fail-fast: false
matrix:
CONFIGURATION: ["debug", "release"]
steps:
- uses: actions/checkout@v4
- 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-14
strategy:
fail-fast: false
matrix:
# GitHub runners dropped visionOS. https://github.com/actions/runner-images/issues/10559
PLATFORM: ["ios", "macos", "tvos", "watchos"]
CONFIGURATION: ["Debug", "Release"]
steps:
- uses: actions/checkout@v4
- name: Build and Test Library
run: |
set -eu
case "${{matrix.PLATFORM}}" in
ios)
DESTINATION="platform=iOS Simulator,name=iPhone 14,OS=latest"
;;
macos)
DESTINATION="platform=macOS"
;;
tvos)
DESTINATION="platform=tvOS Simulator,name=Apple TV,OS=latest"
;;
visionos)
DESTINATION="platform=visionOS Simulator,name=Apple Vision Pro,OS=latest"
;;
watchos)
DESTINATION="platform=WatchOS Simulator,name=Apple Watch Series 7 (45mm),OS=latest"
;;
esac
xcodebuild \
-scheme GoogleAPIClientForREST-Package \
-configuration ${{ matrix.CONFIGURATION }} \
-destination "${DESTINATION}" \
build test