appdistribution.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. name: appdistribution
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseAppDistribution**'
  6. - '.github/workflows/appdistribution.yml'
  7. - 'Gemfile*'
  8. schedule:
  9. # Run every day at 1am (PST) - cron uses UTC times
  10. - cron: '0 9 * * *'
  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. include:
  21. - os: macos-13
  22. xcode: Xcode_15.2
  23. - os: macos-14
  24. xcode: Xcode_15.4
  25. - os: macos-15
  26. xcode: Xcode_16
  27. runs-on: ${{ matrix.os }}
  28. steps:
  29. - uses: actions/checkout@v4
  30. - uses: ruby/setup-ruby@v1
  31. - name: Setup Bundler
  32. run: scripts/setup_bundler.sh
  33. - name: Xcode
  34. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  35. - name: Build and test
  36. run: |
  37. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppDistribution.podspec \
  38. --platforms=ios
  39. spm-package-resolved:
  40. env:
  41. FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
  42. runs-on: macos-14
  43. outputs:
  44. cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
  45. steps:
  46. - uses: actions/checkout@v4
  47. - name: Generate Swift Package.resolved
  48. id: swift_package_resolve
  49. run: |
  50. swift package resolve
  51. - name: Generate cache key
  52. id: generate_cache_key
  53. run: |
  54. cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
  55. echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
  56. - uses: actions/cache/save@v4
  57. id: cache
  58. with:
  59. path: .build
  60. key: ${{ steps.generate_cache_key.outputs.cache_key }}
  61. spm:
  62. # Don't run on private repo unless it is a PR.
  63. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  64. needs: [spm-package-resolved]
  65. strategy:
  66. matrix:
  67. include:
  68. - os: macos-13
  69. xcode: Xcode_15.2
  70. - os: macos-14
  71. xcode: Xcode_15.4
  72. - os: macos-15
  73. xcode: Xcode_16
  74. runs-on: ${{ matrix.os }}
  75. steps:
  76. - uses: actions/checkout@v4
  77. - uses: actions/cache/restore@v4
  78. with:
  79. path: .build
  80. key: ${{needs.spm-package-resolved.outputs.cache_key}}
  81. - name: Xcode
  82. run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
  83. - name: Initialize xcodebuild
  84. run: scripts/setup_spm_tests.sh
  85. - name: iOS Unit Tests
  86. run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppDistributionUnit iOS spm
  87. catalyst:
  88. # Don't run on private repo unless it is a PR.
  89. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  90. runs-on: macos-14
  91. steps:
  92. - uses: actions/checkout@v4
  93. - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
  94. with:
  95. cache_key: catalyst${{ matrix.os }}
  96. - uses: ruby/setup-ruby@v1
  97. - name: Setup Bundler
  98. run: scripts/setup_bundler.sh
  99. - name: Setup project and Build for Catalyst
  100. run: scripts/test_catalyst.sh FirebaseAppDistribution test FirebaseAppDistribution-Unit-unit
  101. appdistribution-cron-only:
  102. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  103. runs-on: macos-14
  104. strategy:
  105. matrix:
  106. target: [ios]
  107. flags: [
  108. '--use-static-frameworks'
  109. ]
  110. needs: pod-lib-lint
  111. steps:
  112. - uses: actions/checkout@v4
  113. - uses: ruby/setup-ruby@v1
  114. - name: Setup Bundler
  115. run: scripts/setup_bundler.sh
  116. - name: PodLibLint App Distribution Cron
  117. run: |
  118. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppDistribution.podspec \
  119. --platforms=${{ matrix.target }} ${{ matrix.flags }}