app_check.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. name: app_check
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseAppCheck**'
  6. - '.github/workflows/app_check.yml'
  7. schedule:
  8. # Run every day at 11pm (PST) - cron uses UTC times
  9. - cron: '0 7 * * *'
  10. concurrency:
  11. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  12. cancel-in-progress: true
  13. jobs:
  14. pod_lib_lint:
  15. # Don't run on private repo unless it is a PR.
  16. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  17. runs-on: macos-12
  18. strategy:
  19. matrix:
  20. target: [ios, tvos, macos]
  21. env:
  22. # This env var is set because the job has a dependency on the unpublished HeatbeatLoggingTestUtils.
  23. POD_LIB_LINT_ONLY: 1
  24. steps:
  25. - uses: actions/checkout@v2
  26. - uses: ruby/setup-ruby@v1
  27. - name: Setup Bundler
  28. run: scripts/setup_bundler.sh
  29. - name: Configure test keychain
  30. run: scripts/configure_test_keychain.sh
  31. - name: FirebaseAppCheck
  32. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=${{ matrix.target }}
  33. catalyst:
  34. # Don't run on private repo unless it is a PR.
  35. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  36. runs-on: macos-12
  37. env:
  38. # This env var is set because the job has a dependency on the unpublished HeatbeatLoggingTestUtils.
  39. POD_LIB_LINT_ONLY: 1
  40. steps:
  41. - uses: actions/checkout@v2
  42. - uses: ruby/setup-ruby@v1
  43. - name: Setup Bundler
  44. run: scripts/setup_bundler.sh
  45. - name: Setup project and Build for Catalyst
  46. run: scripts/test_catalyst.sh FirebaseAppCheck test FirebaseAppCheck-Unit-unit
  47. diagnostics:
  48. # Don't run on private repo unless it is a PR.
  49. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  50. runs-on: macos-12
  51. strategy:
  52. matrix:
  53. diagnostic: [tsan, asan, ubsan]
  54. steps:
  55. - uses: actions/checkout@v2
  56. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  57. with:
  58. cache_key: ${{ matrix.os }}
  59. - name: Initialize xcodebuild
  60. run: scripts/setup_spm_tests.sh
  61. - name: iOS Unit Tests
  62. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppCheckUnit iOS spm ${{ matrix.diagnostic }}
  63. - name: Upload raw logs if failed
  64. if: ${{ failure() }}
  65. uses: actions/upload-artifact@v2
  66. with:
  67. name: failure-xcodebuild-raw-logs
  68. path: xcodebuild.log
  69. app_check-cron-only:
  70. # Don't run on private repo.
  71. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  72. runs-on: macos-12
  73. strategy:
  74. matrix:
  75. flags: [
  76. '--skip-tests --use-modular-headers'
  77. ]
  78. needs: pod_lib_lint
  79. steps:
  80. - uses: actions/checkout@v2
  81. - uses: ruby/setup-ruby@v1
  82. - name: Setup Bundler
  83. run: scripts/setup_bundler.sh
  84. - name: PodLibLint FirebaseAppCheck Cron
  85. # TODO: Remove --allow-warnings when stabilized.
  86. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=ios ${{ matrix.flags }}
  87. spm:
  88. # Don't run on private repo unless it is a PR.
  89. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  90. runs-on: macos-12
  91. strategy:
  92. matrix:
  93. target: [iOS, tvOS, macOS, catalyst, watchOS]
  94. steps:
  95. - uses: actions/checkout@v2
  96. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  97. with:
  98. cache_key: ${{ matrix.os }}
  99. - name: Initialize xcodebuild
  100. run: scripts/setup_spm_tests.sh
  101. - name: Unit Tests
  102. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppCheckUnit ${{ matrix.target }} spm
  103. - name: Swift Unit Tests
  104. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppCheckUnitSwift ${{ matrix.target }} spm