diff --git a/.github/workflows/swift-package-ci.yml b/.github/workflows/swift-package-ci.yml index 76e7b40..0541d42 100644 --- a/.github/workflows/swift-package-ci.yml +++ b/.github/workflows/swift-package-ci.yml @@ -107,9 +107,11 @@ jobs: "https://download.swift.org/swift-$SWIFT_VERSION-release/xcode/swift-$SWIFT_VERSION-RELEASE/swift-$SWIFT_VERSION-RELEASE-osx.pkg" pkgutil --check-signature "$package" sudo installer -pkg "$package" -target / - toolchain="/Library/Developer/Toolchains/swift-$SWIFT_VERSION-RELEASE.xctoolchain/usr/bin" - "$toolchain/swift" --version - echo "$toolchain" >> "$GITHUB_PATH" + toolchain="/Library/Developer/Toolchains/swift-$SWIFT_VERSION-RELEASE.xctoolchain" + "$toolchain/usr/bin/swift" --version + echo "$toolchain/usr/bin" >> "$GITHUB_PATH" + identifier=$(plutil -extract CFBundleIdentifier raw "$toolchain/Info.plist") + echo "TOOLCHAINS=$identifier" >> "$GITHUB_ENV" - name: Validate the package env: CHECK_COMMAND: ${{ matrix.command || needs.configure.outputs.command }} diff --git a/Documentation/Reference/WorkflowIntegration.md b/Documentation/Reference/WorkflowIntegration.md index da5078e..b6831ac 100644 --- a/Documentation/Reference/WorkflowIntegration.md +++ b/Documentation/Reference/WorkflowIntegration.md @@ -5,7 +5,8 @@ changelog path, check command, CI matrix and supported platform generations. The check command runs in the caller's checkout. Each matrix entry defines a unique name, hosted runner and optional installed Xcode version, macOS Swift toolchain version and check command. The `swift` field installs an official release toolchain after selecting Xcode; -that Xcode still owns the Darwin SDK. Validate compiler and SDK compatibility together. +its bundle identifier selects the same compiler for `swift`, `xcrun` and +`xcodebuild`. That Xcode still owns the Darwin SDK. Validate compiler and SDK compatibility together. Use a format-only entry with a consistent formatter toolchain, and compiler-check entries for each supported compiler. All entries must pass for acceptance.