Skip to content

set-up-ci: add Swift / iOS (XcodeGen + xcodebuild) CI template and detection #314

Description

@cboone

Summary

set-up-ci has no Swift / iOS template. The detection table (skills/set-up-ci/SKILL.md, step 1) lists Go, JS/TS, Python, Rust, Ruby, Shell, Zig, Zsh, but not Swift, and there is no references/ci-swift.md / references/makefile-swift.md. A Swift app therefore falls through to the generic make test / make lint workflow, which is useless for an iOS app (no SwiftPM; build is xcodebuild).

Discovered while bootstrapping an iOS app repo (XcodeGen + xcodebuild).

Suggested addition

Add a Swift detection row and a Swift CI template. Two sub-cases:

  • iOS/macOS app (XcodeGen + xcodebuild): needs a macOS runner. Steps: install/run xcodegen generate (if project.yml present), then xcodebuild build and xcodebuild test against a simulator destination. Example core:

    runs-on: macos-latest
    steps:
      - uses: actions/checkout@<sha>
      - run: brew install xcodegen   # or mint, if project.yml present
      - run: xcodegen generate
      - run: xcodebuild -scheme <Scheme> -sdk iphonesimulator \
          -destination 'platform=iOS Simulator,name=iPhone 17 Pro' build
      - run: xcodebuild test -scheme <Scheme> -sdk iphonesimulator \
          -destination 'platform=iOS Simulator,name=iPhone 17 Pro'
  • Swift package (SwiftPM): swift build / swift test, can run on macos-latest (or swift:linux containers for cross-platform libs).

Caveats to document

  • macOS runners cost ~10x Linux minutes; call this out (ties into optimize-runner-usage), especially for private repos.
  • Simulator destination/runtime drift: recommend xcodebuild -downloadPlatform iOS or a runtime-pinning step.
  • Scheme name is project-specific; read it from project.yml or xcodebuild -list.
  • A version file analogous to the other templates: .swift-version (already produced by set-up-linters).

If a full macOS CI template is out of scope, at minimum add Swift to the detection table and have the skill explicitly report "no Swift CI template; macOS runner + xcodebuild required" instead of silently emitting the generic make workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions