Skip to content

Use a matrix for CI #57

Use a matrix for CI

Use a matrix for CI #57

Workflow file for this run

on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test-native:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
include:
- operating-system: ubuntu-20.04
roc-nightly-release: roc_nightly-linux_x86_64-latest.tar.gz
roc-testing-release: roc_nightly-linux_x86_64-TESTING.tar.gz
- operating-system: ubuntu-22.04
roc-nightly-release: roc_nightly-linux_x86_64-latest.tar.gz
roc-testing-release: roc_nightly-linux_x86_64-TESTING.tar.gz
- operating-system: macos-13
roc-nightly-release: roc_nightly-macos_x86_64-latest.tar.gz
roc-testing-release: roc_nightly-macos_x86_64-TESTING.tar.gz
- operating-system: macos-14
roc-nightly-release: roc_nightly-macos_apple_silicon-latest.tar.gz
roc-testing-release: roc_nightly-macos_apple_silicon-TESTING.tar.gz
steps:
- uses: actions/checkout@v4
- name: install z3 & expect for macOS
if: runner.os == 'macOS'
run: brew install z3 expect
- name: install expect for Linux
if: runner.os == 'Linux'
run: sudo apt install -y expect
- id: try_fetching_testing_release
name: try TESTING release
continue-on-error: true
run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/${{ matrix.roc-testing-release }}
- name: fetch NIGHTLY release
if: steps.try_fetching_testing_release.outcome == 'failure'
run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/${{ matrix.roc-nightly-release }}
- 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
- name: remove tar
run: rm roc_nightly.tar.gz
- name: simplify nightly folder name
run: mv roc_nightly* roc_nightly
- name: Check roc version
run: ./roc_nightly/roc version
- name: Run all tests
run: ROC=./roc_nightly/roc ./ci/all_tests.sh