app_check.yml 3.9 KB

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