From 4689f4bd4b292ebf6b237a16bf88d4c1a312daf5 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:16:12 +0200 Subject: [PATCH 1/2] added alpha3 support --- .github/workflows/test.yml | 16 +++++++++++++++ README.md | 3 ++- action.yml | 42 ++++++++++++++++++++++++++++++++++---- 3 files changed, 56 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29265df..ce2f3ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,10 @@ jobs: strategy: matrix: include: + - os: Linux + arch: x86_64 + runner: ubuntu-latest + version: alpha3-rolling - os: Linux arch: x86_64 runner: ubuntu-latest @@ -18,6 +22,10 @@ jobs: arch: x86_64 runner: ubuntu-latest version: nightly + - os: Linux + arch: arm64 + runner: ubuntu-24.04-arm + version: alpha3-rolling - os: Linux arch: arm64 runner: ubuntu-24.04-arm @@ -26,6 +34,10 @@ jobs: arch: arm64 runner: ubuntu-24.04-arm version: nightly + - os: macOS + arch: x86_64 + runner: macos-15-intel + version: alpha3-rolling - os: macOS arch: x86_64 runner: macos-15-intel @@ -34,6 +46,10 @@ jobs: arch: x86_64 runner: macos-15-intel version: nightly + - os: macOS + arch: arm64 + runner: macos-latest + version: alpha3-rolling - os: macOS arch: arm64 runner: macos-latest diff --git a/README.md b/README.md index 954545b..2e73e94 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,14 @@ Add this step to your CI workflow: with: version: alpha4-rolling ``` -> Note: we recommend using this @commit-sha way to specify the version. This makes sure that the included alpha4 release sha256 hashes can not be altered if a github account with access to this repo is hacked. +> Note: 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. ### Using Nightly Releases ```yaml - uses: roc-lang/setup-roc@e2e4452c2bfb0380daadefdb23b989bc9748c63b with: + # Nightly hashes are not verified because they are updated regularly. version: nightly ``` diff --git a/action.yml b/action.yml index ccdcb08..9ffc048 100644 --- a/action.yml +++ b/action.yml @@ -33,13 +33,11 @@ runs: case "$ARCH" in x86_64) PLATFORM="linux_x86_64" - EXPECTED_SHA="96e8be05e6f7176433ada74532ff36a62b8dc44c5247a82cdf919f2dadc5178b" DIR_PATTERN="roc_nightly-linux_x86_64-*" SHA_CMD="sha256sum" ;; aarch64|arm64) PLATFORM="linux_arm64" - EXPECTED_SHA="95558e2b5564b9f2b19fb29ad7df440d4ef7163dea571ffcd39409ef678ecccf" DIR_PATTERN="roc_nightly-linux_arm64-*" SHA_CMD="sha256sum" ;; @@ -53,13 +51,11 @@ runs: case "$ARCH" in x86_64) PLATFORM="macos_x86_64" - EXPECTED_SHA="e8378bdec9fbeaf8f7bae49159a7b43d42050b047375521799984311dcda7078" DIR_PATTERN="roc_nightly-macos_x86_64-*" SHA_CMD="shasum -a 256" ;; arm64) PLATFORM="macos_apple_silicon" - EXPECTED_SHA="416fbd983280eda11ac87b0947e27bf0a86d186a94baebeb71e163942bb5bd84" DIR_PATTERN="roc_nightly-macos_apple_silicon-*" SHA_CMD="shasum -a 256" ;; @@ -75,6 +71,44 @@ runs: ;; esac + # Set expected SHA256 based on version and platform + case "$VERSION-$PLATFORM" in + alpha3-rolling-linux_x86_64) + EXPECTED_SHA="7fa4434b53dc8fb2ea39a2a93925de2eece569dff332365f30e7f93e819762ac" + ;; + alpha3-rolling-linux_arm64) + EXPECTED_SHA="696213a44a082dfe8e3f9a6f41abef0ec390d3a75443f15081eff5532b9305a5" + ;; + alpha3-rolling-macos_x86_64) + EXPECTED_SHA="5e849e461c0be0d80b9a48379699bc6fa397f81b560d98b1ec3185b4d5a3a35f" + ;; + alpha3-rolling-macos_apple_silicon) + EXPECTED_SHA="66cdd1ff3a0968938ae55a1951cbdd79a41a9743310a6fa6a06f24659107593d" + ;; + alpha4-rolling-linux_x86_64) + EXPECTED_SHA="96e8be05e6f7176433ada74532ff36a62b8dc44c5247a82cdf919f2dadc5178b" + ;; + alpha4-rolling-linux_arm64) + EXPECTED_SHA="95558e2b5564b9f2b19fb29ad7df440d4ef7163dea571ffcd39409ef678ecccf" + ;; + alpha4-rolling-macos_x86_64) + EXPECTED_SHA="e8378bdec9fbeaf8f7bae49159a7b43d42050b047375521799984311dcda7078" + ;; + alpha4-rolling-macos_apple_silicon) + EXPECTED_SHA="416fbd983280eda11ac87b0947e27bf0a86d186a94baebeb71e163942bb5bd84" + ;; + nightly-*) + # Nightly builds - no SHA verification + ;; + *) + echo "Error: Unsupported version: $VERSION" + echo "Supported versions: nightly, alpha3-rolling, alpha4-rolling" + echo "Make sure your version is listed in https://github.com/roc-lang/roc/tags and try updating to" + echo "the latest commit of the setup-roc action, see ." + exit 1 + ;; + esac + # Download Roc if [[ "$VERSION" == "nightly" ]]; then DOWNLOAD_URL="https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-${PLATFORM}-latest.tar.gz" From b224e7417a654171e44e43c1b12134d2c910ee49 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:20:43 +0200 Subject: [PATCH 2/2] correct SHA --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 9ffc048..34ce6ba 100644 --- a/action.yml +++ b/action.yml @@ -74,16 +74,16 @@ runs: # Set expected SHA256 based on version and platform case "$VERSION-$PLATFORM" in alpha3-rolling-linux_x86_64) - EXPECTED_SHA="7fa4434b53dc8fb2ea39a2a93925de2eece569dff332365f30e7f93e819762ac" + EXPECTED_SHA="c96045f1f54dc3d9e20c33ede8698d79b01e43f09652795beb4f0bc7fb38cba8" ;; alpha3-rolling-linux_arm64) - EXPECTED_SHA="696213a44a082dfe8e3f9a6f41abef0ec390d3a75443f15081eff5532b9305a5" + EXPECTED_SHA="3eaf492e5e11d39a1c5a549005589405c40902fc0bed517acf8e8a18d190a409" ;; alpha3-rolling-macos_x86_64) - EXPECTED_SHA="5e849e461c0be0d80b9a48379699bc6fa397f81b560d98b1ec3185b4d5a3a35f" + EXPECTED_SHA="205c70d1f6f6f46c2c681350a68cd91886bdb7a24fd09646f3ba5c2b1e1e1379" ;; alpha3-rolling-macos_apple_silicon) - EXPECTED_SHA="66cdd1ff3a0968938ae55a1951cbdd79a41a9743310a6fa6a06f24659107593d" + EXPECTED_SHA="ef64605d0be3296ad25e34b2d6841ed506ded6208565cbd4289bc81c9dbd3c9d" ;; alpha4-rolling-linux_x86_64) EXPECTED_SHA="96e8be05e6f7176433ada74532ff36a62b8dc44c5247a82cdf919f2dadc5178b"