A GitHub Action to download and setup the Roc compiler for Linux and macOS.
Add this step to your CI workflow:
- uses: roc-lang/setup-roc@bd311e2fb815a3d2255f7ee14a922f0b736e020b
with:
# Installs the latest nightly from https://github.com/roc-lang/nightlies
version: nightly-new-compiler- uses: roc-lang/setup-roc@bd311e2fb815a3d2255f7ee14a922f0b736e020b
with:
version: alpha4-rollingNote: we recommend using this @commit-sha way to specify the version. This makes sure that the alpha4 release can not be altered if one of our github accounts is hacked.
- uses: roc-lang/setup-roc@bd311e2fb815a3d2255f7ee14a922f0b736e020b
with:
# Note: nightly hashes are not verified because they are updated regularly.
version: nightlyThis action supports the following platforms:
| OS | Architecture | Status |
|---|---|---|
| Linux | x86_64 | ✅ |
| Linux | arm64 | ✅ |
| macOS | x86_64 (Intel) | ✅ |
| macOS | arm64 (Apple Silicon) | ✅ |
| Windows | x86_64 | ✅ |
| Windows | arm64 | ❌ |
Windows arm64 can be made available again with the next zig release (after 0.16.0).
- Detects your operating system and architecture
- Downloads the appropriate Roc compiler release for your platform
- Verifies the SHA256 checksum to ensure file integrity (skipped for nightly releases)
- Extracts the compiler
- Adds the Roc executable to the PATH
For major releases, the action verifies the SHA256 checksum of the downloaded file to ensure it hasn't been tampered with. If the checksum doesn't match, the action will fail.
For nightly releases, SHA256 verification is skipped because the files are updated regularly.