simplify #32
This file contains hidden or 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
| 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 | ||
| run: | | ||
| smlpkg --version | ||
| - name: Install MLKit | ||
| if: ${{ matrix.mlcomp == 'mlkit' }} | ||
| uses: diku-dk/install-mlkit@HEAD | ||
| 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 | ||