Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic GitHub CI workflow #12

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Matejkob
Copy link

@Matejkob Matejkob commented Oct 5, 2024

I have noticed that the is not CI on this repository; so I'm creating this this pull request that introduces a basic Continuous Integration setup for the repository and incorporates a Swift Macro Compatibility Check to ensure the library's compatibility across multiple swift-syntax versions.

  1. CI Setup:

    • macOS:

      • Runs the workflow on macOS 14 with Xcode versions 15.0, 15.4, and 16.0.
      • Steps include checking out the repository, selecting the correct Xcode version, printing the Swift version, building the package, and running the tests.
    • Linux:

      • Runs on the latest Ubuntu with Swift versions 5.9, 5.10, and 6.0.
      • Includes checking out the repository, building the package, and running tests.
      • Uses a Swift container for each version.
    • Windows:

      • Runs on the latest Windows image with Swift versions 5.9.1 (macros support added in 5.9.1), 5.10, and 6.0.
      • The Swift toolchain is installed using compnerd/gha-setup-swift.
      • Steps include checking out the repository, installing Swift, building the package, and running tests.
  2. Swift Macro Compatibility Check:

    • Motivation: The action ensures the library remains compatible with multiple swift-syntax versions, which is critical for libraries utilizing Swift macros introduced in Swift 5.9.
    • Problem Addressed: Different libraries might depend on different versions of swift-syntax, causing dependency conflicts. The compatibility check ensures that our library can work across a range of swift-syntax versions, making it a good citizen in the Swift ecosystem and preventing conflicts when users combine multiple libraries that depend on swift-syntax.
    • Features:
      • Tests against all minor versions and major versions of swift-syntax (e.g., 509.x, 510.x, 600.x).
      • Includes the option to run tests and verbose output.
      • Helps catch potential compatibility issues early, ensuring smooth integration with other libraries.

@Matejkob Matejkob marked this pull request as draft October 5, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant