Skip to content

Commit 36316e7

Browse files
authored
use setup-roc action (#153)
* use setup-roc action * macos 13 deprecated
1 parent 31b4075 commit 36316e7

File tree

4 files changed

+18
-40
lines changed

4 files changed

+18
-40
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions: {}
1212

1313
env:
1414
JUMP_START: 1
15-
ROC: ./roc_nightly/roc
15+
ROC: roc
1616
EXAMPLES_DIR: ./examples/
1717

1818
jobs:
@@ -24,28 +24,12 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v4
2626

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

48-
- run: ./roc_nightly/roc version
32+
- run: roc version
4933

5034
- name: Install dependencies (Ubuntu)
5135
if: startsWith(matrix.os, 'ubuntu-')
@@ -78,10 +62,10 @@ jobs:
7862
if: startsWith(matrix.os, 'ubuntu-')
7963
run: |
8064
if [[ "${{ matrix.os }}" == *"-arm" ]]; then
81-
# TODO debug this: CARGO_BUILD_TARGET=aarch64-unknown-linux-musl ./roc_nightly/roc build.roc -- --roc ./roc_nightly/roc
65+
# TODO debug this: CARGO_BUILD_TARGET=aarch64-unknown-linux-musl roc build.roc -- --roc roc
8266
echo "no-op"
8367
else
84-
CARGO_BUILD_TARGET=x86_64-unknown-linux-musl ./roc_nightly/roc build.roc -- --roc ./roc_nightly/roc
68+
CARGO_BUILD_TARGET=x86_64-unknown-linux-musl roc build.roc -- --roc roc
8569
fi
8670
8771

.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 and macos-15 uses aarch64
19-
os: [macos-13, macos-15, ubuntu-22.04, ubuntu-24.04-arm]
18+
# macos-15-intel uses x86-64 machine, macos-14 and macos-15 uses 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
@@ -98,7 +92,7 @@ jobs:
9892
env:
9993
ROC_DOCS_URL_ROOT: /basic-webserver/main
10094
run: |
101-
./roc_nightly/roc docs ./platform/main.roc
95+
roc docs ./platform/main.roc
10296
10397
mkdir -p "./temp_docs/main"
10498

.github/workflows/test_latest_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
test-latest-release:
1515
strategy:
1616
matrix:
17-
# macos-13 uses x86_64, macos-14 uses apple silicon (arm64)
18-
os: [ubuntu-22.04, macos-13, macos-14]
17+
# macos-15-intel uses x86_64, macos-14 uses apple silicon (arm64)
18+
os: [ubuntu-22.04, macos-15-intel, macos-14]
1919
runs-on: ${{ matrix.os }}
2020
steps:
2121
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)