Skip to content

Commit

Permalink
Add Swift Macro Compatibility Check to CI (#3406)
Browse files Browse the repository at this point in the history
* Add Swift Macro Compatibility Check GitHub Action

This PR adds a **Swift Macro Compatibility Check** GitHub Action to ensure that macro changes remain compatible across different versions of `swift-syntax`. The action automatically verifies compatibility with major `swift-syntax` versions (`509.0.0`, `510.0.0`, `600.0.0`), running builds and tests. It's also posible to turn on checking agains all versions of `swift-syntax`.

#### Key Benefits:
- **Automated Compatibility Checks**: No need to manually test changes across different `swift-syntax` versions—this is handled automatically in CI.
- **Prevents Breakages**: Helps avoid accidentally committing changes that break older versions.

* Use major versions only

* Use `v1` version

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
  • Loading branch information
Matejkob and stephencelis authored Oct 3, 2024
1 parent c8c97a4 commit f043956
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,15 @@ jobs:
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Todos" xcodebuild
- name: VoiceMemos
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="VoiceMemos" xcodebuild

check-macro-compatibility:
name: Check Macro Compatibility
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Swift Macro Compatibility Check
uses: Matejkob/swift-macro-compatibility-check@v1
with:
run-tests: false
major-versions-only: true

0 comments on commit f043956

Please sign in to comment.