|
26 | 26 | with: |
27 | 27 | license_header_check_project_name: "Swift.org" |
28 | 28 | api_breakage_check_allowlist_path: "api-breakages.txt" |
| 29 | + compatibility_check: |
| 30 | + # Format a list of real-world projects that enforce formatting using the latest swift-format version. |
| 31 | + name: Check compatibility with real world projects |
| 32 | + runs-on: ubuntu-latest |
| 33 | + container: |
| 34 | + image: swift:6.2 |
| 35 | + steps: |
| 36 | + - name: Checkout repository |
| 37 | + uses: actions/checkout@v4 |
| 38 | + with: |
| 39 | + persist-credentials: false |
| 40 | + - name: Check out related PRs |
| 41 | + run: | |
| 42 | + apt-get update && apt-get install -y curl |
| 43 | + curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/cross-pr-checkout.swift > /tmp/cross-pr-checkout.swift |
| 44 | + swift /tmp/cross-pr-checkout.swift "${{ github.repository }}" "${{ github.event.number }}" |
| 45 | + - name: Build |
| 46 | + run: swift build --configuration release |
| 47 | + - name: Format swift-format |
| 48 | + run: .build/release/swift-format lint --parallel --recursive --strict . |
| 49 | + - name: Checkout swift-syntax |
| 50 | + uses: actions/checkout@v4 |
| 51 | + with: |
| 52 | + repository: swiftlang/swift-syntax |
| 53 | + persist-credentials: false |
| 54 | + path: swift-syntax |
| 55 | + - name: Format swift-syntax |
| 56 | + run: .build/release/swift-format lint --parallel --recursive --strict swift-syntax |
| 57 | + - name: Checkout sourcekit-lsp |
| 58 | + uses: actions/checkout@v4 |
| 59 | + with: |
| 60 | + repository: swiftlang/sourcekit-lsp |
| 61 | + persist-credentials: false |
| 62 | + path: sourcekit-lsp |
| 63 | + - name: Format sourcekit-lsp |
| 64 | + run: .build/release/swift-format lint --parallel --recursive --strict sourcekit-lsp |
0 commit comments