app_check.yml 4.0 KB

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