name: Mac CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: Install dependencies
      run: |
        brew update
        brew install tcl-tk@8 autoconf curl
        brew link tcl-tk@8
    - name: configure
      run: |       
        autoreconf -vi
        ./configure --with-tcl=/opt/homebrew/lib --prefix=/usr/local
    - name: make
      run: make
    - name: install
      run: sudo make install
    - name: test
      run: make test
