Skip to content

simplify

simplify #31

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
mlcomp: [mlkit, mlton]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup environment
run: |
echo "OS=$(uname -s | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "RUNHOME=$(echo $HOME)" >> $GITHUB_ENV
- name: Install smlpkg
uses: diku-dk/install-smlpkg@HEAD
- name: Check smlpkg
run: |
smlpkg --version
- name: Install MLKit
if: ${{ matrix.mlcomp == 'mlkit' }}
uses: diku-dk/install-mlkit@HEAD
- name: Check MLKit
if: ${{ matrix.mlcomp == 'mlkit' }}
run: |
mlkit --version
- name: Install MLton (linux)
if: ${{ env.OS == 'linux' && matrix.mlcomp == 'mlton' }}
run: |
sudo apt-get install -y mlton
mlton
- name: Install MLton (macos)
if: ${{ env.OS == 'darwin' && matrix.mlcomp == 'mlton' }}
run: |
brew install mlton
mlton
- name: Build
run: MLCOMP=${{ matrix.mlcomp }} make clean all
- name: Run tests
run: MLCOMP=${{ matrix.mlcomp }} make test