installations.yml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. name: installations
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseInstallations**'
  6. - '.github/workflows/installations.yml'
  7. - 'Gemfile'
  8. schedule:
  9. # Run every day at 10pm (PST) - cron uses UTC times
  10. - cron: '0 6 * * *'
  11. jobs:
  12. pod-lib-lint:
  13. # Don't run on private repo unless it is a PR.
  14. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  15. runs-on: macOS-latest
  16. env:
  17. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos]
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Setup Bundler
  24. run: scripts/setup_bundler.sh
  25. - name: Install GoogleService-Info.plist
  26. run: |
  27. mkdir -p FirebaseInstallations/Source/Tests/Resources
  28. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  29. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  30. - name: Get boolean for secrets available
  31. id: secrets
  32. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  33. - name: Build and test
  34. run: |
  35. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  36. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  37. --platforms=${{ matrix.target }} --ignore-local-podspecs=FirebaseInstanceID.podspec
  38. spm:
  39. # Don't run on private repo unless it is a PR.
  40. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  41. runs-on: macOS-latest
  42. steps:
  43. - uses: actions/checkout@v2
  44. - name: Xcode 12
  45. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  46. - name: Initialize xcodebuild
  47. run: xcodebuild -list
  48. - name: iOS Unit Tests
  49. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations iOS spmbuildonly
  50. spm-cron:
  51. # Don't run on private repo.
  52. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  53. runs-on: macOS-latest
  54. strategy:
  55. matrix:
  56. target: [tvOS, macOS, catalyst]
  57. steps:
  58. - uses: actions/checkout@v2
  59. - name: Xcode 12
  60. run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
  61. - name: Initialize xcodebuild
  62. run: xcodebuild -list
  63. - name: Unit Tests
  64. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations ${{ matrix.target }} spmbuildonly
  65. catalyst:
  66. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  67. runs-on: macOS-latest
  68. steps:
  69. - uses: actions/checkout@v2
  70. - name: Setup Bundler
  71. run: scripts/setup_bundler.sh
  72. - name: Setup project and Build for Catalyst
  73. run: scripts/test_catalyst.sh FirebaseInstallations test FirebaseInstallations-Unit-unit
  74. quickstart:
  75. # Don't run on private repo unless it is a PR.
  76. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  77. runs-on: macOS-latest
  78. steps:
  79. - uses: actions/checkout@v2
  80. - name: Setup quickstart
  81. run: scripts/setup_quickstart.sh installations
  82. - name: Copy mock plist
  83. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  84. - name: Test objc quickstart
  85. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations
  86. - name: Test swift quickstart
  87. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations swift
  88. installations-cron-only:
  89. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  90. runs-on: macos-latest
  91. env:
  92. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  93. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  94. strategy:
  95. matrix:
  96. target: [ios, tvos, macos]
  97. flags: [
  98. '--use-static-frameworks',
  99. '--use-libraries'
  100. ]
  101. needs: pod-lib-lint
  102. steps:
  103. - uses: actions/checkout@v2
  104. - name: Setup Bundler
  105. run: scripts/setup_bundler.sh
  106. - name: Install GoogleService-Info.plist
  107. run: |
  108. mkdir -p FirebaseInstallations/Source/Tests/Resources
  109. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  110. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  111. - name: Get boolean for secrets available
  112. id: secrets
  113. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  114. - name: PodLibLint Installations Cron
  115. run: |
  116. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  117. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  118. --platforms=${{ matrix.target }} ${{ matrix.flags }} \
  119. --ignore-local-podspecs=FirebaseInstanceID.podspec