firebase_app_check.yml 3.8 KB

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