13
13
# limitations under the License.
14
14
15
15
# A workflow that runs tests on every new pull request
16
-
name: Build apps
16
+
name: Build and Test
17
17
18
18
on:
19
19
repository_dispatch:
20
20
types: [build]
21
21
pull_request:
22
22
branches: ['*']
23
+
workflow_call:
24
+
25
+
concurrency:
26
+
group: ${{ github.workflow }}-${{ github.ref }}
27
+
cancel-in-progress: true
23
28
24
29
jobs:
25
-
build_dev_app:
30
+
build_test_swift_package:
31
+
name: Build Swift Package
26
32
runs-on: macos-latest
27
33
28
34
steps:
29
-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
35
+
# Checks out the repository under $GITHUB_WORKSPACE so this job can access it
30
36
- name: Checkout google-maps-ios-utils
31
-
uses: actions/checkout@v3
37
+
uses: actions/checkout@v4
38
+
39
+
# Specify the latest stable Xcode version, since the default for macos-latest might not meet SDK minimum Xcode requirements.
40
+
- name: Set Xcode version
41
+
uses: maxim-lobanov/setup-xcode@v1
42
+
with:
43
+
xcode-version: latest-stable
44
+
45
+
# For as long as this is a mixed-language library, swift build will not support the Obj-C part of the code so we must use xcodebuild.
46
+
- name: Build and analyze Swift Package with xcodebuild
47
+
run: |
48
+
xcodebuild clean build analyze \
49
+
-scheme GoogleMapsUtils -configuration Debug \
50
+
-destination "platform=iOS Simulator,OS=17.4,name=iPhone 15" \
51
+
-disableAutomaticPackageResolution | xcpretty
52
+
53
+
- name: Run unit tests on Swift Package
54
+
run: |
55
+
xcodebuild test -scheme GoogleMapsUtils \
56
+
-destination "platform=iOS Simulator,OS=17.4,name=iPhone 15" \
57
+
-disableAutomaticPackageResolution
58
+
59
+
- name: Upload test results to CodeCov
60
+
run: bash <(curl -s https://codecov.io/bash)
61
+
62
+
# Dev App CI removed; use Sample Apps instead
63
+
# build_dev_app:
64
+
# runs-on: macos-latest
65
+
66
+
# - name: Build DevApp
67
+
# run: |
68
+
# xcodebuild -scheme DevApp -configuration Debug -destination "platform=iOS Simulator,OS=16.2,name=iPhone 8" build | xcpretty
69
+
70
+
build_test_cocoapod:
71
+
name: Build and test the CocoaPod spec
72
+
runs-on: macos-latest
73
+
steps:
74
+
# Checks out the repository under $GITHUB_WORKSPACE so this job can access it
75
+
- name: Checkout google-maps-ios-utils
76
+
uses: actions/checkout@v4
32
77
33
78
- name: Install Dependencies
34
79
run: sudo gem install cocoapods
35
80
36
-
- name: CocoaPods spec lint
81
+
# Validate the library for CocoaPods locally
82
+
- name: CocoaPods lib lint
37
83
run: pod lib lint Google-Maps-iOS-Utils.podspec
38
84
39
-
- name: Build DevApp
40
-
run: |
41
-
xcodebuild -scheme DevApp -configuration Debug -destination "platform=iOS Simulator,OS=16.2,name=iPhone 8" build | xcpretty
42
-
43
85
build_swift_sample:
86
+
name: Build Swift Sample App with CocoaPods locally
44
87
runs-on: macos-latest
45
88
46
89
steps:
47
90
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
48
91
- name: Checkout google-maps-ios-utils
49
-
uses: actions/checkout@v3
92
+
uses: actions/checkout@v4
50
93
51
94
- name: Install Dependencies
52
95
run: sudo gem install cocoapods
@@ -58,9 +101,10 @@ jobs:
58
101
run: |
59
102
xcodebuild -workspace samples/SwiftDemoApp/SwiftDemoApp.xcworkspace \
60
103
-scheme SwiftDemoApp -configuration Debug \
61
-
-destination "platform=iOS Simulator,OS=16.2,name=iPhone 8" build | xcpretty
104
+
-destination "platform=iOS Simulator,OS=17.5,name=iPhone 15" build | xcpretty
62
105
63
106
build_objc_sample:
107
+
name: Build Objective-C Sample App with CocoaPods locally
64
108
runs-on: macos-latest
65
109
66
110
steps:
@@ -78,15 +122,17 @@ jobs:
78
122
run: |
79
123
xcodebuild -workspace samples/ObjCDemoApp/ObjCDemoApp.xcworkspace \
80
124
-scheme ObjCDemoApp -configuration Debug \
81
-
-destination "platform=iOS Simulator,OS=16.2,name=iPhone 8" build | xcpretty
125
+
-destination "platform=iOS Simulator,OS=17.5,name=iPhone 15" build | xcpretty
82
126
83
127
test: # used as required status check
84
128
runs-on: ubuntu-latest
85
129
continue-on-error: false
86
130
strategy:
87
131
fail-fast: true
88
132
needs:
89
-
- build_dev_app
133
+
- build_test_swift_package
134
+
# - build_dev_app
135
+
- build_test_cocoapod
90
136
- build_swift_sample
91
137
- build_objc_sample
92
138
steps:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4