@@ -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-')
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-')
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
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
0 commit comments