The Crystal Programming Language Forum

GitHub Action to install Crystal and Shards: unified CI across Linux, macOS, *and Windows*

The common approach to test Crystal projects on GitHub Actions has been to use the official Docker image. However, that is limited to Linux and has side effects:

Instead, I bring to your attention the practice that’s more common for other programming languages: just install it into the main environment!

It works on Linux, macOS and Windows (even Shards has been made to work on Windows).
It is very convenient to use it with GitHub’s matrix config, so you don’t need to set up separate solutions depending on the OS. You can also put the version of Crystal (incl. nightly) into the test matrix.

Some examples: