crystal-lang / distribution-scripts

40 stars 23 forks source link

Add libffi to build images and in the compiler build workflows #170

Closed straight-shoota closed 2 years ago

straight-shoota commented 2 years ago

The upcoming interpreter feature requires libffi (https://github.com/crystal-lang/crystal/pull/11475).

It's only needed in the compiler, so the regular packages don't need to ship the library. It's statically linked into the compiler.

But the build images need it in order to run specs for libffi in CI.

straight-shoota commented 2 years ago

After this is merged, we should rebuild and update the build images to include the library, so we can run the specs properly (see https://github.com/crystal-lang/crystal/pull/11475#issuecomment-972937107).

We should do this at least for the 1.2.2 images. 1.0.0 and 1.1.1 are also used in CI, but we could as well just skip these specs there.

straight-shoota commented 2 years ago

We need to adopt this change to the (existing) Docker images in order to unblock running FFI specs in CI on the regular distribution images.

I think the easiest way is to update the distribution-scripts reference in the release branch (https://github.com/crystal-lang/crystal/tree/release/1.2). That should trigger a maintenance build and we can promote the resulting docker images to replace the 1.2.2 images. We could also just build those images locally, but committing to the release branch makes sense to keep this documented.

straight-shoota commented 2 years ago

Ah no, this won't work. This would trigger a maintenance build and that means CRYSTAL_VERSION is derived from the branch name. We should probably change that so that builds from a release branch always use the content of src/VERSION. Maintenance builds from other branches should keep the branch as version.

To skip to the yak shaving, we should just build the images locally with proper CRYSTAL_VERSION and upload from there.