Verify a Swift package’s minimum toolchain and CLI contract
说明与用途
在 CI 环境和本地验证 Swift 包的最低工具链和 CLI 合同。
问题
Ensuring a Swift package builds and runs correctly across declared toolchain versions and on different platforms, including validating its CLI contract.
结果
The workflow demonstrates that the package builds and passes unit tests on Swift 6.0.3 (Linux), 6.1.2 (macOS), and 6.4 (Ubuntu). The Python script confirms the executable’s CLI contract across four cases, providing evidence beyond the tools version declaration.
工作流
- Clone repository
- Checkout tag 0.1.1
- Verify Swift version with
swift --version - Run
swift build - Run
swift test - Execute
python3 Scripts/check-fixture.pyto validate CLI contract
证据
The public workflow run records three successful environments: Linux, macOS 15 runner, Ubuntu 24.04 runner.
Each job prints swift --version before building.
The Python script uses the standard library. Its four‑case check expects the debug executable produced by the preceding build.
- 记录日期: 2026-10-04T04:40:54.166Z