Modernize the Swift CI tutorial (current Swift versions, refreshed pins, cross-platform guidance)#44870
Modernize the Swift CI tutorial (current Swift versions, refreshed pins, cross-platform guidance)#44870leogdion wants to merge 3 commits into
Conversation
…platform) - Update example Swift versions from 5.2/5.3/5.3.3 to 5.10/6.0/6.1 - Refresh swift-actions/setup-swift pin from a 2021 commit to v2.4.0 - Add "Building and testing on Linux with a container" section, linking the release (swift) and nightly (swiftlang/swift) Docker images, with a nightly example - Add native "Building and testing for Apple platforms with Xcode" section (xcodebuild + simulator destinations), including how to check available Xcode/simulators on the macOS runner and how to download missing platform runtimes - Add "Building and testing on Windows" (compnerd/gha-setup-swift) and "Building and testing on Android" (skiptools/swift-android-action) sections - Add "Building and testing across multiple platforms with one action" (brightdigit/swift-build) with per-platform examples for Apple, Linux, Windows, Android, and WebAssembly, including the download-platform input Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The "single specific Swift version" and "building and testing your code" examples pin a third-party action by SHA but only carried the not-certified disclaimer. Add the matching actions-use-sha-pinning-comment reusable so every third-party block is consistent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
heckj
left a comment
There was a problem hiding this comment.
A minor re-wording bit that I spotted early on.
I'm not sure that I'd (personally) suggest that including lots of platform builds from a single workflow is a good idea - I've found it far easier to break it up so that I can find and identify errors where re-running something too try again doesn't require all the resources of all platforms. But that's totally my own opinion.
Co-authored-by: Joseph Heck <j_heck@apple.com>
Why:
Closes: #44868
The "Building and testing Swift" tutorial had aged out of date — examples pinned Swift 5.2/5.3/5.3.3 and referenced
swift-actions/setup-swiftat a 2021 commit, and the page covered only Ubuntu/macOSswift build/swift test. This PR refreshes the tutorial and adds current cross-platform guidance.What's being changed (if available, include any code snippets, screenshots, or gifs):
File:
content/actions/tutorials/build-and-test-code/swift.md["6.1", "6.2", "6.3"], single version →"6.3"(current GA release).swift-actions/setup-swiftpin from the 2021 commit to v2.4.0 (7ca6abe…), keeping the existing not-certified-by-GitHub notice and SHA-pinning reusables.swiftrelease images, and links theswiftlang/swiftnightly images, with a nightly example.xcodebuild+ simulator-destination(no third-party action), notes how to check the runner's available Xcode/SDKs/simulators, and how to download a missing simulator runtime (xcodebuild -downloadPlatform).compnerd/gha-setup-swift(eeda069…, v0.4.0).skiptools/swift-android-action(2044b79…, v2.9.5).brightdigit/swift-build(b0a63a8…, v1.5.7), shown as a wrapper over the platform setup above, with per-platform examples (Apple, Linux, Windows, Android, WebAssembly) and thedownload-platforminput.All third-party examples carry the page's standard
actions-not-certified-by-github-commentnotice and are SHA-pinned peractions-use-sha-pinning-comment.Disclosure
I'm the maintainer of
brightdigit/swift-build. I've kept its mention neutral and placed it after the native/per-platform approaches (Xcode,compnerd/gha-setup-swift,skiptools/swift-android-action), in the same spirit the page already referencesswift-actions/setup-swift. If the team prefers a lighter touch, I'm glad to trim the multi-platform section down to a single neutral mention, or drop it entirely and keep just the version/pin/Linux modernization.Check off the following:
Section outline after this change