app_check.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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-11
  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. - name: Setup Bundler
  27. run: scripts/setup_bundler.sh
  28. - name: Configure test keychain
  29. run: scripts/configure_test_keychain.sh
  30. - name: FirebaseAppCheck
  31. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=${{ matrix.target }}
  32. catalyst:
  33. # Don't run on private repo unless it is a PR.
  34. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  35. runs-on: macos-11
  36. env:
  37. # This env var is set because the job has a dependency on the unpublished HeatbeatLoggingTestUtils.
  38. POD_LIB_LINT_ONLY: 1
  39. steps:
  40. - uses: actions/checkout@v2
  41. - name: Setup Bundler
  42. run: scripts/setup_bundler.sh
  43. - name: Setup project and Build for Catalyst
  44. run: scripts/test_catalyst.sh FirebaseAppCheck test FirebaseAppCheck-Unit-unit
  45. diagnostics:
  46. # Don't run on private repo unless it is a PR.
  47. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  48. runs-on: macos-11
  49. strategy:
  50. matrix:
  51. diagnostic: [tsan, asan, ubsan]
  52. steps:
  53. - uses: actions/checkout@v2
  54. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  55. with:
  56. cache_key: ${{ matrix.os }}
  57. - name: Initialize xcodebuild
  58. run: scripts/setup_spm_tests.sh
  59. - name: iOS Unit Tests
  60. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppCheckUnit iOS spm ${{ matrix.diagnostic }}
  61. - name: Upload raw logs if failed
  62. if: ${{ failure() }}
  63. uses: actions/upload-artifact@v2
  64. with:
  65. name: failure-xcodebuild-raw-logs
  66. path: xcodebuild.log
  67. app_check-cron-only:
  68. # Don't run on private repo.
  69. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  70. runs-on: macos-11
  71. strategy:
  72. matrix:
  73. flags: [
  74. '--skip-tests --use-modular-headers'
  75. ]
  76. needs: pod_lib_lint
  77. steps:
  78. - uses: actions/checkout@v2
  79. - name: Setup Bundler
  80. run: scripts/setup_bundler.sh
  81. - name: PodLibLint FirebaseAppCheck Cron
  82. # TODO: Remove --allow-warnings when stabilized.
  83. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=ios ${{ matrix.flags }}
  84. spm:
  85. # Don't run on private repo unless it is a PR.
  86. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  87. runs-on: macos-11
  88. strategy:
  89. matrix:
  90. target: [iOS, tvOS, macOS, catalyst, watchOS]
  91. steps:
  92. - uses: actions/checkout@v2
  93. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  94. with:
  95. cache_key: ${{ matrix.os }}
  96. - name: Initialize xcodebuild
  97. run: scripts/setup_spm_tests.sh
  98. - name: Unit Tests
  99. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppCheckUnit ${{ matrix.target }} spm
  100. - name: Swift Unit Tests
  101. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppCheckUnitSwift ${{ matrix.target }} spm