Fix Xcode 27 build and runtime failures (#547) #517
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # These jobs are run on everything, including main and PRs. | |
| name: Validate | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| env: | |
| XCODE_VERSION: "26.6" | |
| jobs: | |
| release-config: | |
| name: Release Config | |
| timeout-minutes: 5 | |
| runs-on: macos-26 | |
| steps: | |
| - uses: actions/checkout@v6.0.3 | |
| # The repo Actions allowlist permits GitHub-owned actions only, so this | |
| # uses the Ruby version already installed on the macOS runner. | |
| - name: Install Ruby dependencies | |
| run: | | |
| ruby -v | |
| bundle install | |
| - name: Validate Ruby and Fastlane config | |
| run: | | |
| ruby -v | |
| bundle exec ruby -c fastlane/Fastfile | |
| bundle exec fastlane --version | |
| bundle exec fastlane lanes | |
| lint: | |
| name: Lint | |
| timeout-minutes: 2 | |
| runs-on: macos-26 | |
| defaults: | |
| run: | |
| working-directory: ./Vault | |
| steps: | |
| - uses: actions/checkout@v6.0.3 | |
| - run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer | |
| - name: Cache SPM Dependencies | |
| uses: actions/cache@v5.0.5 | |
| with: | |
| path: | | |
| ~/Library/Caches/org.swift.swiftpm/repositories | |
| Vault/.build | |
| key: ${{ runner.os }}-spm-lint-xcode-${{ env.XCODE_VERSION }}-${{ hashFiles('Vault/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm-lint-xcode-${{ env.XCODE_VERSION }}- | |
| - name: Check Linting & Formatting | |
| run: make lint | |
| ci-ios-build: | |
| name: CI_iOS Build | |
| timeout-minutes: 20 | |
| runs-on: macos-26 | |
| steps: | |
| - uses: actions/checkout@v6.0.3 | |
| - run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer | |
| - name: Log Xcode Version | |
| run: xcodebuild -version | |
| - name: Cache SPM Dependencies | |
| uses: actions/cache@v5.0.5 | |
| with: | |
| path: ~/Library/Caches/org.swift.swiftpm/repositories | |
| key: ${{ runner.os }}-spm-ci-ios-xcode-${{ env.XCODE_VERSION }}-${{ hashFiles('Vault/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm-ci-ios-xcode-${{ env.XCODE_VERSION }}- | |
| - name: Build CI_iOS | |
| run: | | |
| xcodebuild build-for-testing \ | |
| -workspace Vault.xcworkspace \ | |
| -scheme CI_iOS \ | |
| -testPlan iOSAllTests \ | |
| -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.5' \ | |
| -derivedDataPath "$RUNNER_TEMP/ci-ios-derived-data" \ | |
| -skipMacroValidation \ | |
| -skipPackagePluginValidation | |
| - name: Package CI_iOS Test Products | |
| run: tar -czf "$RUNNER_TEMP/ci-ios-test-products.tgz" -C "$RUNNER_TEMP/ci-ios-derived-data/Build" Products | |
| - name: Upload CI_iOS Test Products | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: ci-ios-test-products | |
| path: ${{ runner.temp }}/ci-ios-test-products.tgz | |
| if-no-files-found: error | |
| retention-days: 1 | |
| ci-ios-tests: | |
| name: CI_iOS Tests (${{ matrix.suite }}) | |
| timeout-minutes: 20 | |
| runs-on: macos-26 | |
| needs: ci-ios-build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - suite: VaultiOSTests | |
| only_testing: VaultiOSTests | |
| - suite: VaultSettingsTests | |
| only_testing: VaultSettingsTests | |
| - suite: FoundationExtensionsTests | |
| only_testing: FoundationExtensionsTests | |
| - suite: ImageToolsTests | |
| only_testing: ImageToolsTests | |
| - suite: VaultiOSAutofillTests | |
| only_testing: VaultiOSAutofillTests | |
| - suite: VaultiOSWidgetsTests | |
| only_testing: VaultiOSWidgetsTests | |
| - suite: VaultFeedTests | |
| only_testing: VaultFeedTests | |
| - suite: VaultKeygenTests | |
| only_testing: VaultKeygenTests | |
| - suite: VaultCoreTests | |
| only_testing: VaultCoreTests | |
| - suite: VaultKeygenSpeedtestCompileTests | |
| only_testing: VaultKeygenSpeedtestCompileTests | |
| - suite: VaultExportTests | |
| only_testing: VaultExportTests | |
| - suite: VaultBackupTests | |
| only_testing: VaultBackupTests | |
| - suite: CryptoEngineTests | |
| only_testing: CryptoEngineTests | |
| steps: | |
| - uses: actions/checkout@v6.0.3 | |
| - run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer | |
| - name: Download CI_iOS Test Products | |
| uses: actions/download-artifact@v8.0.1 | |
| with: | |
| name: ci-ios-test-products | |
| path: ${{ runner.temp }} | |
| - name: Run CI_iOS Tests | |
| run: | | |
| mkdir -p "$RUNNER_TEMP/ci-ios-derived-data/Build" | |
| tar -xzf "$RUNNER_TEMP/ci-ios-test-products.tgz" -C "$RUNNER_TEMP/ci-ios-derived-data/Build" | |
| XCTESTRUN="$(find "$RUNNER_TEMP/ci-ios-derived-data/Build/Products" -maxdepth 1 -name '*.xctestrun' -print -quit)" | |
| if [[ -z "$XCTESTRUN" ]]; then | |
| echo "No .xctestrun file found in downloaded CI_iOS test products." | |
| exit 1 | |
| fi | |
| xcodebuild test-without-building \ | |
| -xctestrun "$XCTESTRUN" \ | |
| -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.5' \ | |
| -only-testing:${{ matrix.only_testing }} \ | |
| -parallel-testing-enabled NO | |
| ci-ios: | |
| name: CI_iOS | |
| timeout-minutes: 5 | |
| runs-on: ubuntu-latest | |
| needs: [ci-ios-build, ci-ios-tests] | |
| if: always() | |
| steps: | |
| - name: Check CI_iOS Shards | |
| run: | | |
| if [[ "${{ needs.ci-ios-build.result }}" != "success" || "${{ needs.ci-ios-tests.result }}" != "success" ]]; then | |
| echo "CI_iOS build result: ${{ needs.ci-ios-build.result }}" | |
| echo "CI_iOS tests result: ${{ needs.ci-ios-tests.result }}" | |
| exit 1 | |
| fi |