diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8035f1..6b57177 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: - run: ./roc_nightly/roc version # Run all tests - - run: ./ci/all_tests.sh + - run: ROC=./roc_nightly/roc ./ci/all_tests.sh # TODO clippy, rustfmt, roc fmt check diff --git a/ci/all_tests.sh b/ci/all_tests.sh index 6e048d7..0444488 100755 --- a/ci/all_tests.sh +++ b/ci/all_tests.sh @@ -3,21 +3,29 @@ # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ set -euxo pipefail -roc='./roc_nightly/roc' +if [ -z "${ROC}" ]; then + echo "ERROR: The ROC environment variable is not set. + Set it to something like: + /home/username/Downloads/roc_nightly-linux_x86_64-2023-10-30-cb00cfb/roc + or + /home/username/gitrepos/roc/target/build/release/roc" >&2 + + exit 1 +fi examples_dir='./examples/' # roc check for roc_file in $examples_dir*.roc; do - $roc check $roc_file + $ROC check $roc_file done # roc build architecture=$(uname -m) for roc_file in $examples_dir*.roc; do - $roc build $roc_file + $ROC build $roc_file done # test building website -$roc docs platform/main.roc +$ROC docs platform/main.roc