Repository navigation
Add unit tests and a CI workflow - #2
Merged
Merged
Conversation
…ation - Run xcodebuild directly with an argument array and currentDirectoryURL instead of interpolating paths into a bash string, so paths with spaces or quotes no longer break the build. - Build the archive path with URL APIs so custom output folders without a trailing slash resolve correctly. - Drain stdout and stderr concurrently to avoid hanging once a pipe buffer fills up; return early when the process fails to launch. - Report cancellation as TaskError.canceled; on the first failure cancel the remaining archives and show a single error instead of error + success. - Use generic/platform=macOS,variant=Mac Catalyst instead of x86_64-only.
After every selected platform is archived, FrameGen now: - runs xcodebuild -create-xcframework with each framework and its dSYM; - zips the bundle with ditto and computes the SwiftPM checksum (SHA-256); - writes a ready-to-paste .binaryTarget snippet next to the zip; - warns about slices that ship without PrivacyInfo.xcprivacy. Archives are built with SWIFT_ENABLE_LIBRARY_EVOLUTION and SWIFT_EMIT_MODULE_INTERFACE set explicitly: current Xcode no longer derives them from BUILD_LIBRARIES_FOR_DISTRIBUTION, and -create-xcframework rejects Swift frameworks without a .swiftinterface. The success alert now offers "Show in Finder".
UI (AppKit, NSViewController-based MVC, no SwiftUI): - Welcome screen with Open Project (⌘O), recent projects and drag and drop of an .xcodeproj or its folder anywhere in the window. - Project form in the System Settings style: scheme, configuration, platform switches and output folder; choices persist per project. - Live build screen with step statuses, durations, the current xcodebuild action and a collapsible log; Stop with ⌘. or Esc. - Inline result with files, SwiftPM checksum and binaryTarget snippet with copy buttons, and a privacy manifest warning instead of modal alerts. - Failure screen with the failed step, extracted compiler errors and the log. - Full menu bar (File, Edit, Product, Window), unified toolbar, Settings window (⌘,), window frame autosave, system colors and Dark Mode. Architecture: - Models: Workspace, Project and BuildState as @observable classes; view controllers follow them through withObservationTracking. - BuildController runs the pipeline with async/await and task cancellation. - ProcessRunner streams xcodebuild output as an AsyncThrowingStream and interrupts the process on cancellation; xcodebuild -list -json replaces text parsing and every command passes -project explicitly. Project settings: Xcode 27.1, macOS 27.0 deployment target, arm64 only, Swift 6 language mode with MainActor default isolation and approachable concurrency. Info.plist and entitlements drop unused iOS keys and rights. The previous MVP sources (Flows, Managers, Resources, Core) are no longer part of the target and can be deleted.
Flows, Managers, Resources and Core were replaced by the AppKit MVC controllers, models and services and were no longer part of the target.
- Rewrite the README for the AppKit redesign: features, requirements, usage, output layout, shortcuts, building and architecture. - Replace the screenshots of the old UI with the welcome, configuration, progress and result screens. - Add a .gitignore and remove xcuserdata from the index; the files stay on disk.
- New FrameGenTests target (Swift Testing, hosted by the app) in the
shared scheme, with 34 tests covering:
- ProjectInfo decoding of xcodebuild -list -json, including fallbacks;
- XcodeCommand arguments, including paths with spaces and quotes;
- XCFrameworkBuilder plans (slices, dSYMs, errors, stale output) and
finalize (checksum, snippet, privacy manifests in flat and versioned
frameworks);
- ProcessRunner streaming, exit codes, stderr handling, cancellation;
- BuildState activity parsing and resets;
- ProjectLocator search depth, packages, hidden folders.
- .github/workflows/ci.yml builds and tests on pushes and pull requests to
main. Hosted runners may lack Xcode 27; the workflow fails with a clear
message and points to a self-hosted runner.
- README explains how to run the tests.
No production code changed.
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.
Summary
Adds the first test suite and a CI workflow. Builds on #1. Until #1 is merged, its commits also show up here; the commit that belongs to this PR is
7cff50f.Changes
ProjectInfodecoding ofxcodebuild -list -json, including fallbacks when schemes or configurations are missing;XcodeCommandarguments for every platform, including paths with spaces and quotes;XCFrameworkBuilder.makePlan(slices, dSYMs, error cases, stale output) andfinalize(checksum, snippet, privacy manifests in flat and versioned frameworks);ProcessRunner(line streaming, exit codes, merged and separate stderr, cancellation, missing executable);BuildStateactivity parsing and resets;ProjectLocator(search depth, packages, hidden folders)..github/workflows/ci.ymlbuilds and tests on pushes and pull requests tomain. It needs Xcode 27; on a runner without it, the "Select Xcode 27" step fails with a message pointing to a self-hosted runner.Testing
xcodebuild test -scheme FrameGen -destination 'platform=macOS,arch=arm64' CODE_SIGNING_ALLOWED=NOpasses locally: 34 passed, 0 failed.Notes for reviewers
/varis a symlink to/private/var, soTemporaryDirectoryusesrealpathto give path comparisons a canonical root.