-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (51 loc) · 1.8 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-test:
strategy:
matrix:
os: [ubuntu-20.04, macos-12]
mlcomp: [mlkit, mlton]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup environment
run: |
echo "OS=$(uname -s | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "RUNHOME=$(echo $HOME)" >> $GITHUB_ENV
- name: Install MLKit and smlpkg
working-directory: ${{ env.RUNHOME }}
run: |
echo "[OS: $OS, HOME: $RUNHOME]"
wget https://github.com/diku-dk/smlpkg/releases/download/v0.1.4/smlpkg-bin-dist-${{env.OS}}.tgz
tar xzf smlpkg-bin-dist-${{env.OS}}.tgz
echo "$HOME/smlpkg-bin-dist-${{env.OS}}/bin" >> $GITHUB_PATH
wget https://github.com/melsman/mlkit/releases/download/v4.7.11/mlkit-bin-dist-${{env.OS}}.tgz
tar xzf mlkit-bin-dist-${{env.OS}}.tgz
echo "$HOME/mlkit-bin-dist-${{env.OS}}/bin" >> $GITHUB_PATH
mkdir -p .mlkit
echo "SML_LIB $HOME/mlkit-bin-dist-${{env.OS}}/lib/mlkit" > .mlkit/mlb-path-map
- name: Check
run: |
mlkit --version
smlpkg --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