firebase_app_check.yml 3.5 KB

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