Build Samples #2570
This file contains 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
# Copyright 2020 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Build Samples | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ '*' ] | |
repository_dispatch: | |
types: [ build ] | |
schedule: | |
- cron: '0 22 * * *' | |
workflow_dispatch: | |
jobs: | |
build-MapsSnippets: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=snippets/MapsSnippets | |
- name: Build project | |
run: | | |
echo "Building" | |
xcodebuild -workspace snippets/MapsSnippets.xcworkspace \ | |
-scheme MapsSnippets \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-MapsUtilsSnippets: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=snippets/MapsUtilsSnippets | |
- name: Build project | |
run: | | |
echo "Building" | |
xcodebuild -workspace snippets/MapsUtilsSnippets.xcworkspace \ | |
-scheme MapsUtilsSnippets \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-PlacesSnippets: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=snippets/PlacesSnippets | |
- name: Build project | |
run: | | |
echo "Building" | |
xcodebuild -workspace snippets/GoogleMapsDemos.xcworkspace \ | |
-scheme PlacesSnippets \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-GoogleMaps: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=GoogleMaps/ | |
- name: Build project | |
run: | | |
echo "Replacing #error for API key" | |
sed -i .prev '/#error/'d GoogleMaps/GoogleMapsXCFrameworkDemos/SDKDemoAPIKey.h | |
echo "Building" | |
xcodebuild -workspace GoogleMaps/GoogleMapsXCFrameworkDemos.xcworkspace \ | |
-scheme GoogleMapsXCFrameworkDemos \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-GoogleMaps-Swift: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=GoogleMaps-Swift/ | |
- name: Build project | |
run: | | |
echo "Replacing #error for API key" | |
sed -i .prev '/#error/'d GoogleMaps-Swift/GoogleMapsSwiftXCFrameworkDemos/Swift/SDKConstants.swift | |
echo "Building" | |
xcodebuild -workspace GoogleMaps-Swift/GoogleMapsSwiftXCFrameworkDemos.xcworkspace \ | |
-scheme GoogleMapsSwiftXCFrameworkDemos \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-GooglePlaces: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=GooglePlaces/ | |
- name: Build project | |
run: | | |
echo "Replacing #error for API key" | |
sed -i .prev '/#error/'d GooglePlaces/GooglePlacesXCFrameworkDemos/SDKDemoAPIKey.h | |
echo "Building" | |
xcodebuild -workspace GooglePlaces/GooglePlacesXCFrameworkDemos.xcworkspace \ | |
-scheme GooglePlacesXCFrameworkDemos \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-GooglePlaces-Swift: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=GooglePlaces-Swift/ | |
- name: Build project | |
run: | | |
echo "Replacing #error for API key" | |
sed -i .prev '/#error/'d GooglePlaces-Swift/GooglePlacesSwiftXCFrameworkDemos/Swift/SDKDemoAPIKey.swift | |
echo "Building" | |
xcodebuild -workspace GooglePlaces-Swift/GooglePlacesSwiftXCFrameworkDemos.xcworkspace \ | |
-scheme GooglePlacesSwiftXCFrameworkDemos \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-GoogleNavigation: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=GoogleNavigation/ | |
- name: Build project | |
run: | | |
echo "Replacing #error for API key" | |
sed -i .prev '/#error/'d GoogleNavigation/GoogleNavXCFrameworkDemos/SDKDemoAPIKey.h | |
echo "Building" | |
xcodebuild -workspace GoogleNavigation/GoogleNavXCFrameworkDemos.xcworkspace \ | |
-scheme GoogleNavigationXCFrameworkDemos \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-GoogleNavigation-Swift: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=GoogleNavigation-Swift/ | |
- name: Build project | |
run: | | |
echo "Replacing #error for API key" | |
sed -i .prev '/#error/'d GoogleNavigation-Swift/GoogleNavSwiftXCFrameworkDemos/Swift/SDKDemoAPIKey.swift | |
echo "Building" | |
xcodebuild -workspace GoogleNavigation-Swift/GoogleNavSwiftXCFrameworkDemos.xcworkspace \ | |
-scheme GoogleNavigationSwiftXCFrameworkDemos \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-current-place-on-map: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=tutorials/current-place-on-map/ | |
- name: Build project | |
run: | | |
echo "Building" | |
xcodebuild -workspace tutorials/current-place-on-map.xcworkspace \ | |
-scheme current-place-on-map \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-map-with-marker: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=tutorials/map-with-marker/ | |
- name: Build project | |
run: | | |
echo "Building" | |
xcodebuild -workspace tutorials/map-with-marker.xcworkspace \ | |
-scheme map-with-marker \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-places-address-form: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=tutorials/places-address-form/ | |
- name: Build project | |
run: | | |
echo "Building" | |
xcodebuild -workspace tutorials/places-address-form.xcworkspace \ | |
-scheme places-address-form \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 8 build | xcpretty | |
build-MapsPlacesDemo-form: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install CocoaPods | |
run: | | |
sudo gem install cocoapods | |
- name: Run pod install | |
run: | | |
pod install --project-directory=MapsAndPlacesDemo/ | |
- name: Build project | |
run: | | |
echo "Replacing #error for API key" | |
sed -i .prev '/#error/'d MapsAndPlacesDemo/MapsAndPlacesDemo/ApiKeys.swift | |
echo "Building" | |
xcodebuild -workspace MapsAndPlacesDemo/MapsAndPlacesDemo.xcworkspace \ | |
-scheme MapsAndPlacesDemo \ | |
-destination platform\=iOS\ Simulator,OS\=13.3,name\=iPhone\ 11 build | xcpretty | |
test: # used as required status check | |
runs-on: ubuntu-latest | |
needs: | |
- build-MapsSnippets | |
- build-MapsUtilsSnippets | |
- build-PlacesSnippets | |
- build-GoogleMaps | |
- build-GoogleMaps-Swift | |
- build-GooglePlaces | |
- build-GooglePlaces-Swift | |
- build-GoogleNavigation | |
- build-GoogleNavigation-Swift | |
- build-current-place-on-map | |
- build-map-with-marker | |
- build-places-address-form | |
- build-MapsPlacesDemo-form | |
steps: | |
- run: echo "Fail if all other steps are not successful" |