firebase_app_check.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. strategy:
  19. matrix:
  20. podspec: [FirebaseAppCheckInterop.podspec, FirebaseAppCheck.podspec]
  21. # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
  22. target: [ios, tvos, macos --skip-tests, watchos]
  23. os: [macos-14, macos-13]
  24. include:
  25. - os: macos-13
  26. xcode: Xcode_15.2
  27. - os: macos-14
  28. xcode: Xcode_15.3
  29. runs-on: ${{ matrix.os }}
  30. steps:
  31. - uses: actions/checkout@v4
  32. - uses: ruby/setup-ruby@v1
  33. - name: Setup Bundler
  34. run: scripts/setup_bundler.sh
  35. - name: Configure test keychain
  36. run: scripts/configure_test_keychain.sh
  37. - name: Xcode
  38. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  39. - name: FirebaseAppCheck
  40. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }}
  41. catalyst:
  42. # Don't run on private repo unless it is a PR.
  43. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  44. runs-on: macos-14
  45. steps:
  46. - uses: actions/checkout@v4
  47. - uses: ruby/setup-ruby@v1
  48. - name: Setup Bundler
  49. run: scripts/setup_bundler.sh
  50. - name: Setup project and Build for Catalyst
  51. run: scripts/test_catalyst.sh FirebaseAppCheck test FirebaseAppCheck-Unit-unit
  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-14
  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: Initialize xcodebuild
  65. run: scripts/setup_spm_tests.sh
  66. - name: iOS Unit Tests
  67. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseAppCheckUnit iOS spm ${{ matrix.diagnostic }}
  68. - name: Upload raw logs if failed
  69. if: ${{ failure() }}
  70. uses: actions/upload-artifact@v4
  71. with:
  72. name: failure-xcodebuild-raw-logs
  73. path: xcodebuild.log
  74. app_check-cron-only:
  75. # Don't run on private repo.
  76. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  77. runs-on: macos-14
  78. strategy:
  79. matrix:
  80. flags: [
  81. '--skip-tests --use-modular-headers'
  82. ]
  83. needs: pod_lib_lint
  84. steps:
  85. - uses: actions/checkout@v4
  86. - uses: ruby/setup-ruby@v1
  87. - name: Setup Bundler
  88. run: scripts/setup_bundler.sh
  89. - name: PodLibLint FirebaseAppCheck Cron
  90. # TODO: Remove --allow-warnings when stabilized.
  91. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=ios ${{ matrix.flags }}
  92. spm:
  93. # Don't run on private repo unless it is a PR.
  94. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  95. strategy:
  96. matrix:
  97. target: [iOS, tvOS, macOS, catalyst, watchOS]
  98. os: [macos-14, macos-13]
  99. include:
  100. - os: macos-14
  101. xcode: Xcode_15.3
  102. - os: macos-13
  103. xcode: Xcode_15.2
  104. runs-on: ${{ matrix.os }}
  105. steps:
  106. - uses: actions/checkout@v4
  107. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  108. with:
  109. cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
  110. - name: Xcode
  111. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  112. - name: Initialize xcodebuild
  113. run: scripts/setup_spm_tests.sh
  114. - name: Unit Tests
  115. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseAppCheckUnit ${{ matrix.target }} spm
  116. - name: Swift Unit Tests
  117. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseAppCheckUnitSwift ${{ matrix.target }} spm