Skip to content

Fix DocC generation simulator destination for CI compatibility#371

Merged
MikeThorntonPayPal merged 5 commits intomainfrom
fix-docc-ci-simulator-destination
Feb 11, 2026
Merged

Fix DocC generation simulator destination for CI compatibility#371
MikeThorntonPayPal merged 5 commits intomainfrom
fix-docc-ci-simulator-destination

Conversation

@MikeThorntonPayPal
Copy link
Collaborator

@MikeThorntonPayPal MikeThorntonPayPal commented Feb 9, 2026

Reason for changes

Fixes multiple issues preventing documentation and test workflows from running successfully on GitHub Actions CI runners.

Summary of changes

1. Documentation Generation Simulator Destination

The ci script was using a specific device destination (platform=iOS Simulator,name=iPhone 17) which doesn't work with xcodebuild docbuild. Documentation generation only needs a generic destination since it compiles code but doesn't execute it.

Solution: Changed to generic/platform=iOS Simulator for documentation builds.

2. Unit Tests Workflow Simulator Destination

The tests workflow was also using iPhone 17 without specifying an OS version, causing it to fail on CI runners.

Solution: Updated to platform=iOS Simulator,name=iPhone 17,OS=26.2 to explicitly specify both device and OS version.

3. GitHub Pages Branch Initialization

The publish-docs workflow had faulty logic for creating the gh-pages branch when it doesn't exist, causing the workflow to fail on first run.

Solution: Fixed the branch creation logic to properly handle the case where gh-pages doesn't exist yet.

4. Non-functional CSS Customization

Removed custom CSS injection code that attempted to hide module icons and add environment badges. The CSS selectors didn't work with DocC's JavaScript-generated DOM, and the code added unnecessary complexity.

Solution: Removed all CSS customization. Documentation now uses default DocC styling, ensuring local and GitHub Pages documentation appear identical.

Checklist

  • Documentation workflow runs successfully on CI
  • Tests workflow runs successfully on CI
  • GitHub Pages deploys correctly
  • Documentation appears correctly on GitHub Pages

Authors

  • @michthornton

Use generic iOS Simulator destination instead of specific device name
to ensure compatibility across different CI environments.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@MikeThorntonPayPal MikeThorntonPayPal force-pushed the fix-docc-ci-simulator-destination branch from 8764cf1 to 122f474 Compare February 9, 2026 18:49
Update tests workflow to use a generic iOS Simulator destination
that will work on any CI runner without requiring a specific device.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@MikeThorntonPayPal MikeThorntonPayPal force-pushed the fix-docc-ci-simulator-destination branch from 122f474 to 38690ea Compare February 9, 2026 18:50
MikeThorntonPayPal and others added 3 commits February 9, 2026 13:18
xcodebuild docbuild and xcodebuild test have different available
destinations. docbuild only supports generic destinations, while test
supports specific simulators.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Handle the case where gh-pages branch doesn't exist yet by properly
checking if fetch succeeds before trying to checkout.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove custom CSS injection for hiding module icons and environment
badges since the CSS selectors don't work with DocC's JavaScript-
generated DOM. Documentation now displays with default DocC styling.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@MikeThorntonPayPal MikeThorntonPayPal merged commit b103446 into main Feb 11, 2026
4 checks passed
@MikeThorntonPayPal MikeThorntonPayPal deleted the fix-docc-ci-simulator-destination branch February 11, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants