Repository navigation
Update tooling and docs, and require Swift 6.4 #72
Workflow file for this run
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
| name: Verify Changes | |
| on: | |
| merge_group: | |
| pull_request: | |
| branches: "**" | |
| push: | |
| branches: ["main"] | |
| env: | |
| XCODE_VERSION: 27.2 | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: xcode-27 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Select Xcode ${{ env.XCODE_VERSION }} | |
| run: sudo xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app | |
| - name: Lint | |
| run: Tools/lint | |
| build-and-test: | |
| name: Build and Test (${{ matrix.platform }}) | |
| needs: lint | |
| runs-on: xcode-27 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: iOS | |
| xcode_destination: "platform=iOS Simulator,OS=27.2,name=iPhone 18 Pro" | |
| - platform: macOS | |
| xcode_destination: "platform=macOS,arch=arm64" | |
| - platform: tvOS | |
| xcode_destination: "platform=tvOS Simulator,OS=27.2,name=Apple TV 4K (4th generation)" | |
| - platform: watchOS | |
| xcode_destination: "platform=watchOS Simulator,OS=27.2,name=Apple Watch Series 12 (46mm)" | |
| env: | |
| DEV_BUILDS: DevBuilds/Sources | |
| OTHER_XCBEAUTIFY_FLAGS: --renderer github-actions | |
| XCCOV_PRETTY_VERSION: 1.2.0 | |
| XCODE_SCHEME: DevTesting-Package | |
| XCODE_DESTINATION: ${{ matrix.xcode_destination }} | |
| XCODE_TEST_PLAN: DevTesting-Package | |
| XCODE_TEST_PRODUCTS_PATH: .build/DevTesting.xctestproducts | |
| steps: | |
| - name: Select Xcode ${{ env.XCODE_VERSION }} | |
| run: sudo xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Checkout DevBuilds | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: DevKitOrganization/DevBuilds | |
| path: DevBuilds | |
| - name: Restore XCTestProducts | |
| if: github.event_name != 'push' | |
| id: cache-xctestproducts-restore | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ env.XCODE_TEST_PRODUCTS_PATH }} | |
| key: cache-xctestproducts-${{ github.workflow }}-${{ matrix.platform }}-${{ github.sha }} | |
| - uses: irgaly/xcode-cache@v1 | |
| if: steps.cache-xctestproducts-restore.outputs.cache-hit != 'true' | |
| with: | |
| key: xcode-cache-deriveddata-${{ env.XCODE_VERSION }}-${{ github.workflow }}-${{ matrix.platform }}-${{ github.sha }} | |
| restore-keys: | | |
| xcode-cache-deriveddata-${{ env.XCODE_VERSION }}-${{ github.workflow }}-${{ matrix.platform }}- | |
| xcode-cache-deriveddata-${{ env.XCODE_VERSION }} | |
| deriveddata-directory: .build/DerivedData | |
| sourcepackages-directory: .build/DerivedData/SourcePackages | |
| swiftpm-package-resolved-file: Package.resolved | |
| - name: Build for Testing | |
| id: build-for-testing | |
| if: steps.cache-xctestproducts-restore.outputs.cache-hit != 'true' | |
| run: ${{ env.DEV_BUILDS }}/build_and_test.sh --action build-for-testing | |
| - name: Test Without Building | |
| id: test-without-building | |
| if: github.event_name != 'push' | |
| run: ${{ env.DEV_BUILDS }}/build_and_test.sh --action test-without-building | |
| - name: Save XCTestProducts | |
| if: (cancelled() || failure()) && steps.cache-xctestproducts-restore.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: ${{ env.XCODE_TEST_PRODUCTS_PATH }} | |
| key: ${{ steps.cache-xctestproducts-restore.outputs.cache-primary-key }} | |
| # Optional until Xcode records coverage for Swift packages again. With Xcode 27.2, result | |
| # bundles have no coverage for package targets, so xccov can’t report it. | |
| - name: Log Code Coverage | |
| id: coverage | |
| if: github.event_name != 'push' | |
| continue-on-error: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release download ${{ env.XCCOV_PRETTY_VERSION }} \ | |
| --repo DevKitOrganization/xccovPretty \ | |
| --pattern "xccovPretty-macos.tar.gz" \ | |
| -O - \ | |
| | tar -xz | |
| chmod +x xccovPretty | |
| xcrun xccov view --report .build/DevTesting-Package_test-without-building.xcresult --json \ | |
| | ./xccovPretty --github-comment \ | |
| > .build/xccovPretty-${{ matrix.platform }}.output | |
| - name: Upload Logs and XCResults | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Logs_and_XCResults-${{ matrix.platform }} | |
| path: | | |
| .build/*.log | |
| .build/*.xcresult | |
| include-hidden-files: true | |
| - name: Upload xccovPretty output | |
| if: github.event_name != 'push' && steps.coverage.outcome == 'success' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: xccovPrettyOutput-${{ matrix.platform }} | |
| path: .build/xccovPretty-${{ matrix.platform }}.output | |
| include-hidden-files: true | |
| post-pr-comments: | |
| name: Post PR Comments | |
| needs: build-and-test | |
| if: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download xccovPretty output | |
| id: download-coverage | |
| continue-on-error: true | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: xccovPrettyOutput-macOS | |
| - name: Post Code Coverage Comment | |
| if: steps.download-coverage.outcome == 'success' | |
| uses: thollander/actions-comment-pull-request@v3 | |
| with: | |
| file-path: xccovPretty-macOS.output | |
| comment-tag: codeCoverage-macOS |