| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- name: remoteconfig
- on:
- push:
- branches:
- - master
- pull_request:
- paths:
- - 'FirebaseRemoteConfig**'
- - '.github/workflows/remoteconfig.yml'
- - 'Gemfile'
- schedule:
- # Run every day at 11pm (PST) - cron uses UTC times
- - cron: '0 7 * * *'
- jobs:
- remoteconfig:
- env:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- runs-on: macos-latest
- strategy:
- matrix:
- target: [iOS, tvOS, macOS]
- steps:
- - uses: actions/checkout@v2
- - name: Setup Bundler
- run: scripts/setup_bundler.sh
- - name: Install Secret GoogleService-Info.plist
- run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/RemoteConfigSwiftAPI/GoogleService-Info.plist.gpg \
- FirebaseRemoteConfig/Tests/SwiftAPI/GoogleService-Info.plist "$plist_secret"
- - name: BuildAndUnitTest # can be replaced with pod lib lint with CocoaPods 1.10
- run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig ${{ matrix.target }} unit
- - name: Fake Console API Tests
- run: scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS fakeconsole
- - name: IntegrationTest
- if: matrix.target == 'iOS'
- run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh RemoteConfig iOS integration)
- pod-lib-lint:
- runs-on: macOS-latest
- strategy:
- matrix:
- target: [ios, tvos, macos]
- steps:
- - uses: actions/checkout@v2
- - name: Setup Bundler
- run: scripts/setup_bundler.sh
- - name: Build and test
- run: |
- scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --skip-tests --platforms=${{ matrix.target }}
- catalyst:
- runs-on: macOS-latest
- steps:
- - uses: actions/checkout@v2
- - name: Setup Bundler
- run: scripts/setup_bundler.sh
- - name: Setup project and Build for Catalyst
- # Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
- run: scripts/test_catalyst.sh FirebaseRemoteConfig build FirebaseRemoteConfig-Unit-unit
- quickstart_framework:
- env:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- runs-on: macOS-latest
- steps:
- - uses: actions/checkout@v2
- - name: Install gcloud tool
- run: scripts/install_gcloud.sh
- - name: Access GCS bucket
- run: |
- scripts/decrypt_gha_secret.sh scripts/gha-encrypted/firebase-ios-testing.json.gpg firebase-ios-testing.json "$plist_secret"
- gcloud auth activate-service-account --key-file firebase-ios-testing.json
- - name: Pull framework zip files from GCS
- run: |
- gsutil cp gs://ios-framework-zip/latest_commit_hash.txt latest_commit_hash.txt
- commit_hash="$(cat 'latest_commit_hash.txt')"
- gsutil cp "gs://ios-framework-zip/Firebase-actions-dir-${commit_hash}.zip" Firebase-actions-dir.zip
- - name: Unzip the framework
- run: |
- mkdir "${HOME}/ios_frameworks"
- unzip Firebase-actions-dir.zip -d "${HOME}/ios_frameworks"
- find "${HOME}/ios_frameworks" -name "*.zip" -maxdepth 2 -exec unzip -d "${HOME}/ios_frameworks" {} +
- pwd
- - name: Setup quickstart
- run: |
- git clone https://github.com/firebase/quickstart-ios.git
- cd quickstart-ios/Config
- chmod +x ../scripts/info_script.rb
- ruby ../scripts/info_script.rb Config
- - name: Move frameworks to xcode project
- run: |
- find "${HOME}/ios_frameworks" -type d -name "Firebase" -maxdepth 1 -exec mv {}/ quickstart-ios/config/ \;
- cd quickstart-ios/config
- ls
- ../scripts/add_framework_script.rb Config ConfigExample Firebase/FirebaseAnalytics
- ../scripts/add_framework_script.rb Config ConfigExample Firebase/FirebaseRemoteConfig
- cd ../..
- - name: Install Secret GoogleService-Info.plist
- run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
- quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
- - name: Install Secret FIREGSignInInfo.h
- run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
- quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
- - name: Test Quickstart
- run: |
- cd quickstart-ios/config
- xcodebuild test -project ConfigExample.xcodeproj -scheme ConfigExample -destination 'platform=iOS Simulator,name=iPhone 11 Pro' "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ObjC" "FRAMEWORK_SEARCH_PATHS= \$(PROJECT_DIR)/Firebase/FirebaseRemoteConfig \$(PROJECT_DIR)/Firebase/FirebaseAnalytics" HEADER_SEARCH_PATHS='$(PROJECT_DIR)/Firebase $(PROJECT_DIR)/Firebase/FirebaseAnalytics $(PROJECT_DIR)/Firebase/FirebaseRemoteConfig'
- - name: Display xcodebuild setup
- if: ${{ failure() }}
- run: |
- cd quickstart-ios/config
- xcodebuild -project ConfigExample.xcodeproj -target "ConfigExample" -showBuildSettings
- - name: Remove data before upload
- if: ${{ failure() }}
- run: |
- rm -rf quickstart-ios/config/Firebase/
- rm -f quickstart-ios/config/GoogleSerivce-info.plist
- rm -f quickstart-ios/TestUtils/FIREGSignInInfo.h
- - uses: actions/upload-artifact@v2
- if: failure()
- with:
- name: quickstart_artifacts
- path: quickstart-ios/
- quickstart:
- env:
- plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
- runs-on: macOS-latest
- steps:
- - uses: actions/checkout@v2
- - name: Setup quickstart
- run: scripts/setup_quickstart.sh config
- - name: Install Secret GoogleService-Info.plist
- run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
- quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
- - name: Install Secret FIREGSignInInfo.h
- run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
- quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
- - name: Test objc quickstart
- run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config)
- - name: Test swift quickstart
- run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config swift)
- remoteconfig-cron-only:
- runs-on: macos-latest
- if: github.event_name == 'schedule'
- strategy:
- matrix:
- target: [ios, tvos, macos]
- flags: [
- '--skip-tests --use-modular-headers',
- '--skip-tests --use-libraries'
- ]
- needs: pod-lib-lint
- steps:
- - uses: actions/checkout@v2
- - name: Setup Bundler
- run: scripts/setup_bundler.sh
- - name: PodLibLint RemoteConfig Cron
- run: |
- scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseRemoteConfig.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
|