Skip to content

Harden the sysimage workflow - #153

Merged
kylebd99 merged 1 commit into
mainfrom
kbd/sysimage-ci
Sep 27, 2026
Merged

kylebd99 merged 1 commit into
mainfrom
kbd/sysimage-ci

Conversation

@kylebd99

Copy link
Copy Markdown
Collaborator

Why

The Sysimage workflow run for the merge of #150 (run 36340670648) lost its ubuntu-latest job. About 6 minutes into PackageCompiler: compiling incremental system image, the log ends with The runner has received a shutdown signal. Julia didn't fail; the VM went away, which on GitHub-hosted runners almost always means it ran out of memory. The final compile is the heaviest step, because the generic CPU target compiles each function for several CPU types.

Tracing worked, and CI computed the same environment key as a local build (1c37dac2d47a03b0), so the pinned environment is reproducible across machines.

Changes

  • Swap on Linux: a 24 GB swap file on /mnt before the build.
  • Resource logging: the build step logs memory, swap and disk every minute. Step logs stream live, so if a runner dies again we can see how close it came.
  • Skip published images: a new scripts/sysimage/info.py resolves the Julia environment and prints the image's key, release tag and asset name. The job skips the build and upload when the release already has that asset, so an unrelated pyproject.toml change no longer costs a multi-hour rebuild. Resolving takes minutes.
  • publish input for manual runs: it defaults to on. Pushes to main always publish.

Testing

I'm testing this with a manual run on this branch with publish off, so it builds all four platforms without creating a release. I checked the name-and-skip logic locally. The swap and logging steps can only be tested on GitHub.

macOS has no swap step, because GitHub's macOS runners don't allow adding swap, and macos-latest has only 7 GB of RAM. If macOS runs out of memory too, the fix is a lighter CPU target in CI or a larger runner.

🤖 Generated with Claude Code

The ubuntu-latest build on main died when the runner VM shut down during
PackageCompiler's final compile, most likely out of memory.

- Add a 24 GB swap file on Linux runners before building.
- Log memory, swap and disk every minute during the build; step logs
  stream live, so this survives a runner dying.
- Skip the build when the release already has this platform's image.
  scripts/sysimage/info.py resolves the environment and prints the image
  name, which takes minutes where a build takes hours.
- Add a `publish` input to manual runs, so the build can be tested
  without publishing a release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kylebd99
kylebd99 merged commit 996cabc into main Sep 27, 2026
10 checks passed
@kylebd99
kylebd99 deleted the kbd/sysimage-ci branch September 27, 2026 19:51
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.

1 participant