Test examples on Ubuntu #624
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
workflow_dispatch: | |
name: Test examples on Ubuntu | |
jobs: | |
test-examples: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-20.04, ubuntu-24.04] | |
timeout-minutes: 90 | |
steps: | |
- uses: actions/checkout@v3 | |
- id: try_fetching_testing_release | |
continue-on-error: true | |
run: | | |
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-TESTING.tar.gz | |
- name: There are no TESTING releases, checking regular releases instead | |
if: steps.try_fetching_testing_release.outcome == 'failure' | |
run: | | |
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-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 | |
- name: get short commit SHA | |
run: echo "SHORT_COMMIT_SHA=$(./roc_nightly/roc version | grep -oP 'commit \K[a-f0-9]+' )" >> $GITHUB_ENV | |
- name: install expect # used to check if output is correct | |
run: sudo apt install -y expect | |
- name: print runner CPU | |
run: lscpu | |
- name: check if roc files are properly formatted | |
run: ROC=./roc_nightly/roc ./ci_scripts/check_format.sh | |
- run: ROC=./roc_nightly/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 |