app_check.yml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. ]
  64. needs: pod_lib_lint
  65. steps:
  66. - uses: actions/checkout@v2
  67. - name: Setup Bundler
  68. run: scripts/setup_bundler.sh
  69. - name: PodLibLint FirebaseAppCheck Cron
  70. # TODO: Remove --allow-warnings when stabilized.
  71. run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=ios ${{ matrix.flags }}
  72. spm:
  73. # Don't run on private repo unless it is a PR.
  74. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  75. runs-on: macos-11
  76. strategy:
  77. matrix:
  78. target: [iOS, tvOS, macOS, catalyst, watchOS]
  79. steps:
  80. - uses: actions/checkout@v2
  81. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  82. with:
  83. cache_key: ${{ matrix.os }}
  84. - name: Initialize xcodebuild
  85. run: scripts/setup_spm_tests.sh
  86. - name: Unit Tests
  87. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppCheckUnit ${{ matrix.target }} spm
  88. - name: Swift Unit Tests
  89. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppCheckUnitSwift ${{ matrix.target }} spm