Repository navigation
Add CI: build and generated-code comparison - #1
Merged
Merged
Conversation
- CI builds the package on pull requests and on pushes to main. - Generated code regenerates from the current upstream spec and fails if the committed sources differ. It runs on pull requests touching the spec patch, the generator script, the manifest or the sources, and every Monday to detect changes in Flowbox's published spec. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- CI regenerates from the current upstream spec and builds, failing on any warning or error in Sources/FlowboxAPI. No diff check against the committed sources. - generate.sh rewrites `public import` to `import` in the generated files: the generator emits public imports that the compiler reports as unused (UnusedImportAccess), 27 warnings in total. The package builds in Swift 5 language mode, where this changes nothing, and now builds with 0 warnings. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One job: build without warnings or errors, then regenerate from the current upstream spec and fail if the committed sources differ. The flow is to regenerate locally and open a pull request. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…warning Remove the rewrite of `public import` and filter, in the CI build check, the UnusedImportAccess warnings the generator emits (swift-openapi-generator#946). Any other warning or error still fails the job. The generated sources are identical to the 0.1.0 tag again. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The build step teed its log to build.log in the checkout, which the comparison step then reported as an untracked file and failed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On the runner swift build colors its diagnostics, so the filter for the known UnusedImportAccess warnings did not match and the step failed. Remove the escape sequences before filtering. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add .xcode-version (read by nomasystems/action-xcode-select, as in create-ios) and make the build step a plain `swift build`. The generator's UnusedImportAccess warnings are known upstream and no longer checked. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The dependencies already require tools 6.1, so 5.9 gave no compatibility. The target now builds in Swift 6 language mode with no errors and no concurrency diagnostics; the public API is unchanged (1,135 symbols identical to the 0.1.0 tag). Swift 5 consumers can still import it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
One GitHub Actions workflow,
CI(.github/workflows/ci.yml), with a singlebuildjob. It runs on pull requests, on pushes tomainand on demand. There is no scheduled run. The Xcode version comes from.xcode-version(26.5, as increate-ios), read bynomasystems/action-xcode-select@v0.2.swift build../generate.sh --refreshand fail ifgit statusis not clean.Workflow to update the client
Regenerate locally with
./generate.sh --refresh, check thatswift buildsucceeds, commit and open a pull request. The check confirms that what is committed is exactly what the generator produces. If Flowbox changes its published spec, later pull requests fail step 2 until the sources are regenerated and committed.About the
UnusedImportAccesswarningsBuilding prints 27 warnings (
public import of 'Foundation' was not used in public declarations):swift-openapi-generator1.13.1 puts the samepublic importlines in every generated file. It is a known upstream issue (#946, fix proposed in #947). The generated sources are the generator's raw output (identical to the0.1.0tag) and the CI does not check warnings.Swift 6
Package.swiftusesswift-tools-version:6.1(the dependencies already required it), so the target is built in Swift 6 language mode: no errors and no concurrency diagnostics, and the public API is unchanged (1,135 symbols, identical to the0.1.0tag). Consumers in Swift 5 mode can still import it.Notes
[self-hosted, macOS, macstudio], the same labels and action ascreate-ios.🤖 Generated with Claude Code