Skip to content

Use SwiftSyntax prebuilt action in CI - #765

Open
kateinoigakukun wants to merge 14 commits into
mainfrom
yt/use-swiftsyntax-prebuilts-ci
Open

Use SwiftSyntax prebuilt action in CI#765
kateinoigakukun wants to merge 14 commits into
mainfrom
yt/use-swiftsyntax-prebuilts-ci

Conversation

@kateinoigakukun

@kateinoigakukunkateinoigakukun commented Jun 11, 2026

Copy link
Copy Markdown
Member

Wires swiftwasm/setup-swift-syntax-prebuilts@v1 into the Linux SwiftSyntax-heavy CI jobs and passes the action's SwiftPM flags into the relevant swift/Makefile/script invocations.

This deliberately does not cache SwiftPM .build/ directories. SwiftPM build products are not guaranteed to be cross-machine portable, so the PR only relies on the action's toolchain/platform-scoped SwiftSyntax prebuilt artifacts.

Action-side prerequisites are now in place:

  • swiftwasm/setup-swift-syntax-prebuilts@v1 points at the merged Node 24 action runtime.
  • Published release assets now exist for JavaScriptKit's current development snapshot:
    • prebuilt-603.0.2-swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a with Ubuntu 22.04 and Ubuntu 24.04 assets.
    • prebuilt-600.0.1-swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a with the Ubuntu 22.04 asset used by check-bridgejs-generated.
  • The action repo also has a follow-up branch (yt/support-swiftpm-triple-build-dir) that fixes build-artifact discovery for SwiftPM's newer triple-qualified build output layout; that was needed to publish the May 2026 assets.

Current timing evidence:

JobLatest mainPR evidenceNotes
Ubuntu 24.04 development15m00s14m33s in run 27335043949Prebuilts restored from GitHub Release, but make unittest still compiles SwiftSyntax as a normal package dependency.
Ubuntu 24.04 Swift 6.3 branch12m29s13m38s in run 27335043949Same limitation; small regression likely from action overhead plus run variance.
Ubuntu 22.04 development20m57s20m48s in run 27335043949Essentially flat; PackageToJS and BridgeJS integration tests dominate.
check-bridgejs-generated3m31s3m36s in run 27335043949Flat; action restore adds a few seconds.
build-examples56m56s57m45s in run 27335043949Flat/slower; example builds dominate and .build/ is intentionally not cached.
swift:6.3 BridgeJS matrix3m12s3m14s in run 27338274284The action is disabled for this job because the Docker image reports compiler tag swift-6.3.2-RELEASE, which has no matching release asset and previously caused a slow local prebuild fallback.

Why the speedup is small:

  • The action does restore assets (Restore source: github-release) for the May 2026 Linux jobs.
  • SwiftPM still compiles SwiftSyntax libraries when JavaScriptKit/BridgeJS depend on them directly (SwiftSyntax, SwiftParser, SwiftSyntaxBuilder, SwiftSyntaxMacros, test-support targets, etc.). The prebuilt action does not replace those normal library dependency builds in the observed CI logs.
  • The longest steps are integration/example paths: PackageToJS's package build finished in ~17s, but its ExampleTests.basic() took ~7.5m; build-examples remains ~58m.
  • We are intentionally not caching .build/, so those package/example builds are cold each run.

Expected CI signal:

  • Covered setup steps should report Restore source: github-release or github-cache.
  • They should not fall back to local-build for the covered SwiftSyntax/toolchain/platform combinations.
  • There is no actions/cache usage for SwiftPM .build/ directories in this PR.

@kateinoigakukun
kateinoigakukunforce-pushed the yt/use-swiftsyntax-prebuilts-ci branch 2 times, most recently from cb2362a to 6bd180dCompareJune 11, 2026 08:45
@kateinoigakukun
kateinoigakukunforce-pushed the yt/use-swiftsyntax-prebuilts-ci branch from dce1531 to 2737803CompareJune 11, 2026 11:47
Sign up for freeto 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.

1 participant

@kateinoigakukun