Skip to content

Commit 825bf45

Browse files
authored
use setup-roc (roc-lang#411)
* use setup-roc * macos 13 deprecated
1 parent b1e6bd3 commit 825bf45

File tree

3 files changed

+16
-38
lines changed

3 files changed

+16
-38
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,12 @@ jobs:
2222
- name: Does init() in platform/src/lib.rs contain all roc_fx functions? (Imperfect check)
2323
run: cat platform/src/lib.rs | grep -oP 'roc_fx_[^(\s]*' | sort | uniq -u | grep -q . && exit 1 || exit 0
2424

25-
- name: Downloading latest roc nightly
26-
run: |
27-
if [[ "${{ runner.os }}-${{ runner.arch }}" == "Linux-ARM64" ]]; then
28-
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-latest.tar.gz
29-
elif [[ "${{ runner.os }}" == "macOS" ]]; then
30-
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz
31-
else
32-
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz
33-
fi
34-
35-
- name: rename nightly tar
36-
run: mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz
37-
38-
- name: decompress the tar
39-
run: tar -xzf roc_nightly.tar.gz
40-
41-
- run: rm roc_nightly.tar.gz
42-
43-
- name: simplify nightly folder name
44-
run: mv roc_nightly* roc_nightly
25+
- uses: roc-lang/setup-roc@39c354a6a838a0089eea9068a0414f49b62c5c08
26+
with:
27+
# Note: nightly hashes are not verified because they are updated regularly.
28+
version: nightly
4529

46-
- run: ./roc_nightly/roc version
30+
- run: roc version
4731

4832
- name: Install dependencies (Ubuntu)
4933
if: startsWith(matrix.os, 'ubuntu-')
@@ -60,7 +44,7 @@ jobs:
6044
- run: expect -v
6145

6246
- name: Run all tests
63-
run: ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh
47+
run: ROC=roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh
6448

6549
- name: Install dependencies for musl build
6650
if: startsWith(matrix.os, 'ubuntu-')
@@ -76,7 +60,7 @@ jobs:
7660
- name: Test building with musl target
7761
if: startsWith(matrix.os, 'ubuntu-')
7862
env:
79-
ROC: ./roc_nightly/roc
63+
ROC: roc
8064
run: |
8165
if [[ "${{ matrix.os}}" == *"-arm" ]]; then
8266
# TODO debug this: CARGO_BUILD_TARGET=aarch64-unknown-linux-musl $ROC build.roc
@@ -90,5 +74,5 @@ jobs:
9074
run: |
9175
# TODO remove `if` when above TODOs are done
9276
if [[ "${{ matrix.os }}" != *"-arm" ]]; then
93-
NO_BUILD=1 IS_MUSL=1 ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh
77+
NO_BUILD=1 IS_MUSL=1 ROC=roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh
9478
fi

.github/workflows/ci_nix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
# macos-13 uses x86-64 machine, macos-14 & 15 use aarch64
19-
os: [macos-13, macos-15, ubuntu-22.04, ubuntu-24.04-arm]
18+
# macos-15-intel uses x86-64 machine, macos-14 & 15 use aarch64
19+
os: [macos-15-intel, macos-15, ubuntu-22.04, ubuntu-24.04-arm]
2020
runs-on: ${{ matrix.os }}
2121
steps:
2222
- uses: actions/checkout@v4

.github/workflows/deploy-docs.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,12 @@ jobs:
3737
- name: Setup Pages
3838
uses: actions/configure-pages@v5
3939

40-
- name: Downloading latest roc nightly
41-
run: |
42-
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz
43-
44-
- name: prep nightly tar for use
45-
run: |
46-
mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz
47-
tar -xzf roc_nightly.tar.gz
48-
rm roc_nightly.tar.gz
49-
mv roc_nightly* roc_nightly
40+
- uses: roc-lang/setup-roc@39c354a6a838a0089eea9068a0414f49b62c5c08
41+
with:
42+
# Note: nightly hashes are not verified because they are updated regularly.
43+
version: nightly
5044

51-
- run: ./roc_nightly/roc version
45+
- run: roc version
5246

5347
- name: Create temp directory for docs
5448
run: mkdir -p ./temp_docs
@@ -101,7 +95,7 @@ jobs:
10195
env:
10296
ROC_DOCS_URL_ROOT: /basic-cli/main
10397
run: |
104-
./roc_nightly/roc docs ./platform/main.roc
98+
roc docs ./platform/main.roc
10599
106100
mkdir -p "./temp_docs/main"
107101

0 commit comments

Comments
 (0)