Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 10 additions & 36 deletions .github/workflows/tests_alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,14 @@ jobs:
timeout-minutes: 90
steps:
- uses: actions/checkout@v4

- name: Set OS-specific variables
id: vars
run: |
if [[ "${{ matrix.operating-system }}" =~ ^ubuntu- ]]; then
if [[ "${{ matrix.operating-system }}" =~ -arm$ ]]; then
echo "os_pattern=linux_arm64" >> $GITHUB_OUTPUT
else
echo "os_pattern=linux_x86_64" >> $GITHUB_OUTPUT
fi
elif [ "${{ matrix.operating-system }}" = "macos-13" ]; then
echo "os_pattern=macos_x86_64" >> $GITHUB_OUTPUT
else
echo "os_pattern=macos_apple_silicon" >> $GITHUB_OUTPUT
fi

- name: Download alpha release
run: |
curl -fOL https://github.com/roc-lang/roc/releases/download/alpha4-rolling/roc-${{ steps.vars.outputs.os_pattern }}-alpha4-rolling.tar.gz

- name: rename alpha tar
run: mv $(ls | grep "roc-.*tar\.gz") roc_alpha.tar.gz

- name: decompress the tar
run: tar -xzf roc_alpha.tar.gz

- run: rm roc_alpha.tar.gz

- name: simplify nightly folder name
run: mv roc_nightly* roc_alpha

- name: get short commit SHA
run: echo "SHORT_COMMIT_SHA=$(./roc_alpha/roc version | grep -oP 'commit \K[a-f0-9]+' )" >> $GITHUB_ENV


- uses: roc-lang/setup-roc@e2e4452c2bfb0380daadefdb23b989bc9748c63b
with:
version: alpha4-rolling

- name: Run Roc
run: roc version

- name: Install dependencies (Ubuntu)
if: startsWith(matrix.operating-system, 'ubuntu-')
run: sudo apt install -y expect
Expand All @@ -66,9 +40,9 @@ jobs:
brew install z3

- name: check if roc files are properly formatted
run: ROC=./roc_alpha/roc ./ci_scripts/check_format.sh
run: ROC=roc ./ci_scripts/check_format.sh

- run: ROC=./roc_alpha/roc ./ci_scripts/all_tests.sh
- run: ROC=roc ./ci_scripts/all_tests.sh

- name: Checks if every folder in examples is mentioned in ./examples/index.md
run: bash ./ci_scripts/check_index.sh
40 changes: 7 additions & 33 deletions .github/workflows/tests_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set OS-specific variables
id: vars
run: |
if [[ "${{ matrix.operating-system }}" =~ ^ubuntu- ]]; then
if [[ "${{ matrix.operating-system }}" =~ -arm$ ]]; then
echo "os_pattern=linux_arm64" >> $GITHUB_OUTPUT
else
echo "os_pattern=linux_x86_64" >> $GITHUB_OUTPUT
fi
elif [ "${{ matrix.operating-system }}" = "macos-13" ]; then
echo "os_pattern=macos_x86_64" >> $GITHUB_OUTPUT
else
echo "os_pattern=macos_apple_silicon" >> $GITHUB_OUTPUT
fi

- name: Download latest nightly release
run: |
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-${{ steps.vars.outputs.os_pattern }}-latest.tar.gz

- name: rename nightly tar
run: mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz

- name: decompress the tar
run: tar -xzf roc_nightly.tar.gz

- run: rm roc_nightly.tar.gz

- name: simplify nightly folder name
run: mv roc_nightly* roc_nightly
- uses: roc-lang/setup-roc@e2e4452c2bfb0380daadefdb23b989bc9748c63b
with:
version: nightly

- name: get short commit SHA
run: echo "SHORT_COMMIT_SHA=$(./roc_nightly/roc version | grep -oP 'commit \K[a-f0-9]+' )" >> $GITHUB_ENV
- name: Run Roc
run: roc version

- name: Install dependencies (Ubuntu)
if: startsWith(matrix.operating-system, 'ubuntu-')
Expand All @@ -66,9 +40,9 @@ jobs:
brew install z3

- name: check if roc files are properly formatted
run: ROC=./roc_nightly/roc ./ci_scripts/check_format.sh
run: ROC=roc ./ci_scripts/check_format.sh

- run: ROC=./roc_nightly/roc ./ci_scripts/all_tests.sh
- run: ROC=roc ./ci_scripts/all_tests.sh

- name: Checks if every folder in examples is mentioned in ./examples/index.md
run: bash ./ci_scripts/check_index.sh