Skip to content

Modernize the Swift CI tutorial (current Swift versions, refreshed pins, cross-platform guidance)#44870

Open
leogdion wants to merge 2 commits into
github:mainfrom
brightdigit:update-swift-ci-tutorial
Open

Modernize the Swift CI tutorial (current Swift versions, refreshed pins, cross-platform guidance)#44870
leogdion wants to merge 2 commits into
github:mainfrom
brightdigit:update-swift-ci-tutorial

Conversation

@leogdion

Copy link
Copy Markdown

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-swift at a 2021 commit, and the page covered only Ubuntu/macOS swift 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

  • Updated Swift versions — matrix → ["6.1", "6.2", "6.3"], single version → "6.3" (current GA release).
  • Refreshed the swift-actions/setup-swift pin from the 2021 commit to v2.4.0 (7ca6abe…), keeping the existing not-certified-by-GitHub notice and SHA-pinning reusables.
  • New section: Building and testing on Linux with a container — uses the official swift release images, and links the swiftlang/swift nightly images, with a nightly example.
  • New section: Building and testing for Apple platforms with Xcode — native 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).
  • New section: Building and testing on Windows — uses compnerd/gha-setup-swift (eeda069…, v0.4.0).
  • New section: Building and testing on Android — uses skiptools/swift-android-action (2044b79…, v2.9.5).
  • New section: Building and testing across multiple platforms with one actionbrightdigit/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 the download-platform input.

All third-party examples carry the page's standard actions-not-certified-by-github-comment notice and are SHA-pinned per actions-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 references swift-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:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

Section outline after this change

  • Introduction / Prerequisites / Using a Swift workflow template (unchanged)
  • Specifying a Swift version → Using multiple Swift versions / Using a single specific Swift version (versions + pin refreshed)
  • Building and testing your code (versions + pin refreshed)
  • Building and testing on Linux with a container (new)
  • Building and testing for Apple platforms with Xcode (new)
  • Building and testing on Windows (new)
  • Building and testing on Android (new)
  • Building and testing across multiple platforms with one action (new) → Apple platforms / Linux / Windows / Android / WebAssembly

leogdion and others added 2 commits June 22, 2026 13:53
…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>
@welcome

welcome Bot commented Jun 22, 2026

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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 links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
actions/tutorials/build-and-test-code/swift.md fpt
ghec
ghes@ 3.21 3.20 3.19 3.18 3.17
fpt
ghec
ghes@ 3.21 3.20 3.19 3.18 3.17

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

@leogdion leogdion marked this pull request as ready for review June 23, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swift CI tutorial examples are outdated (Swift 5.2/5.3, setup-swift pinned to a 2021 commit)

1 participant