Fix MapsAndPlacesDemo build.
#2975
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
| # 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| echo "Building" | |
| xcodebuild -workspace snippets/MapsSnippets/MapsSnippets.xcworkspace \ | |
| -scheme MapsSnippets \ | |
| -destination 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| echo "Building" | |
| xcodebuild -workspace snippets/MapsUtilsSnippets/MapsUtilsSnippets.xcworkspace \ | |
| -scheme MapsUtilsSnippets \ | |
| -destination 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| echo "Building" | |
| xcodebuild -workspace snippets/PlacesSnippets/PlacesSnippets.xcworkspace \ | |
| -scheme PlacesSnippets \ | |
| -destination 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| 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 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| 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 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| 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 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| 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 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| echo "Replacing #error for API key" | |
| sed -i .prev '/#error/'d GoogleNavigation/GoogleNavXCFrameworkDemos/SDKDemoAPIKey.h | |
| echo "Building" | |
| xcodebuild -workspace GoogleNavigation/GoogleNavXCFrameworkDemos.xcworkspace \ | |
| -scheme GoogleNavXCFrameworkDemos \ | |
| -destination 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| 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 GoogleNavSwiftXCFrameworkDemos \ | |
| -destination 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| echo "Building" | |
| xcodebuild -workspace tutorials/current-place-on-map/current-place-on-map.xcworkspace \ | |
| -scheme current-place-on-map \ | |
| -destination 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| echo "Building" | |
| xcodebuild -workspace tutorials/map-with-marker/map-with-marker.xcworkspace \ | |
| -scheme map-with-marker \ | |
| -destination 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| echo "Building" | |
| xcodebuild -workspace tutorials/places-address-form/places-address-form.xcworkspace \ | |
| -scheme places-address-form \ | |
| -destination 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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: | | |
| # Exit immediately if a command in the pipeline fails | |
| set -o pipefail | |
| 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 'generic/platform=iOS' build \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | 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" |