Skip to content

Commit 39c354a

Browse files
authored
added alpha3 support (#3)
* added alpha3 support * correct SHA
1 parent 92992d5 commit 39c354a

File tree

3 files changed

+56
-5
lines changed

3 files changed

+56
-5
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ jobs:
1010
strategy:
1111
matrix:
1212
include:
13+
- os: Linux
14+
arch: x86_64
15+
runner: ubuntu-latest
16+
version: alpha3-rolling
1317
- os: Linux
1418
arch: x86_64
1519
runner: ubuntu-latest
@@ -18,6 +22,10 @@ jobs:
1822
arch: x86_64
1923
runner: ubuntu-latest
2024
version: nightly
25+
- os: Linux
26+
arch: arm64
27+
runner: ubuntu-24.04-arm
28+
version: alpha3-rolling
2129
- os: Linux
2230
arch: arm64
2331
runner: ubuntu-24.04-arm
@@ -26,6 +34,10 @@ jobs:
2634
arch: arm64
2735
runner: ubuntu-24.04-arm
2836
version: nightly
37+
- os: macOS
38+
arch: x86_64
39+
runner: macos-15-intel
40+
version: alpha3-rolling
2941
- os: macOS
3042
arch: x86_64
3143
runner: macos-15-intel
@@ -34,6 +46,10 @@ jobs:
3446
arch: x86_64
3547
runner: macos-15-intel
3648
version: nightly
49+
- os: macOS
50+
arch: arm64
51+
runner: macos-latest
52+
version: alpha3-rolling
3753
- os: macOS
3854
arch: arm64
3955
runner: macos-latest

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ Add this step to your CI workflow:
1818
with:
1919
version: alpha4-rolling
2020
```
21-
> 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.
21+
> 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.
2222
2323
### Using Nightly Releases
2424
2525
```yaml
2626
- uses: roc-lang/setup-roc@e2e4452c2bfb0380daadefdb23b989bc9748c63b
2727
with:
28+
# Nightly hashes are not verified because they are updated regularly.
2829
version: nightly
2930
```
3031

action.yml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@ runs:
3333
case "$ARCH" in
3434
x86_64)
3535
PLATFORM="linux_x86_64"
36-
EXPECTED_SHA="96e8be05e6f7176433ada74532ff36a62b8dc44c5247a82cdf919f2dadc5178b"
3736
DIR_PATTERN="roc_nightly-linux_x86_64-*"
3837
SHA_CMD="sha256sum"
3938
;;
4039
aarch64|arm64)
4140
PLATFORM="linux_arm64"
42-
EXPECTED_SHA="95558e2b5564b9f2b19fb29ad7df440d4ef7163dea571ffcd39409ef678ecccf"
4341
DIR_PATTERN="roc_nightly-linux_arm64-*"
4442
SHA_CMD="sha256sum"
4543
;;
@@ -53,13 +51,11 @@ runs:
5351
case "$ARCH" in
5452
x86_64)
5553
PLATFORM="macos_x86_64"
56-
EXPECTED_SHA="e8378bdec9fbeaf8f7bae49159a7b43d42050b047375521799984311dcda7078"
5754
DIR_PATTERN="roc_nightly-macos_x86_64-*"
5855
SHA_CMD="shasum -a 256"
5956
;;
6057
arm64)
6158
PLATFORM="macos_apple_silicon"
62-
EXPECTED_SHA="416fbd983280eda11ac87b0947e27bf0a86d186a94baebeb71e163942bb5bd84"
6359
DIR_PATTERN="roc_nightly-macos_apple_silicon-*"
6460
SHA_CMD="shasum -a 256"
6561
;;
@@ -75,6 +71,44 @@ runs:
7571
;;
7672
esac
7773
74+
# Set expected SHA256 based on version and platform
75+
case "$VERSION-$PLATFORM" in
76+
alpha3-rolling-linux_x86_64)
77+
EXPECTED_SHA="c96045f1f54dc3d9e20c33ede8698d79b01e43f09652795beb4f0bc7fb38cba8"
78+
;;
79+
alpha3-rolling-linux_arm64)
80+
EXPECTED_SHA="3eaf492e5e11d39a1c5a549005589405c40902fc0bed517acf8e8a18d190a409"
81+
;;
82+
alpha3-rolling-macos_x86_64)
83+
EXPECTED_SHA="205c70d1f6f6f46c2c681350a68cd91886bdb7a24fd09646f3ba5c2b1e1e1379"
84+
;;
85+
alpha3-rolling-macos_apple_silicon)
86+
EXPECTED_SHA="ef64605d0be3296ad25e34b2d6841ed506ded6208565cbd4289bc81c9dbd3c9d"
87+
;;
88+
alpha4-rolling-linux_x86_64)
89+
EXPECTED_SHA="96e8be05e6f7176433ada74532ff36a62b8dc44c5247a82cdf919f2dadc5178b"
90+
;;
91+
alpha4-rolling-linux_arm64)
92+
EXPECTED_SHA="95558e2b5564b9f2b19fb29ad7df440d4ef7163dea571ffcd39409ef678ecccf"
93+
;;
94+
alpha4-rolling-macos_x86_64)
95+
EXPECTED_SHA="e8378bdec9fbeaf8f7bae49159a7b43d42050b047375521799984311dcda7078"
96+
;;
97+
alpha4-rolling-macos_apple_silicon)
98+
EXPECTED_SHA="416fbd983280eda11ac87b0947e27bf0a86d186a94baebeb71e163942bb5bd84"
99+
;;
100+
nightly-*)
101+
# Nightly builds - no SHA verification
102+
;;
103+
*)
104+
echo "Error: Unsupported version: $VERSION"
105+
echo "Supported versions: nightly, alpha3-rolling, alpha4-rolling"
106+
echo "Make sure your version is listed in https://github.com/roc-lang/roc/tags and try updating to"
107+
echo "the latest commit of the setup-roc action, see <https://github.com/roc-lang/setup-roc>."
108+
exit 1
109+
;;
110+
esac
111+
78112
# Download Roc
79113
if [[ "$VERSION" == "nightly" ]]; then
80114
DOWNLOAD_URL="https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-${PLATFORM}-latest.tar.gz"

0 commit comments

Comments
 (0)