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: |
        set -x
        brew update
        brew install tcl-tk || true
        brew install boost || true
        sudo mkdir -p /usr/local
        sudo ln -sf /usr/local/opt/tcl-tk/include /usr/local/include/tcl8.6
        sudo cp /usr/local/opt/tcl-tk/lib/libtcl* /usr/local/lib
        sudo ln -sf /usr/local/opt/tcl-tk/bin/tclsh8.6 /usr/local/bin/tclsh
        sudo ln -sf /usr/local/opt/tcl-tk/bin/tclsh8.6 /usr/local/bin/tclsh8.6
    - name: configure
      run: |       
        autoreconf -vi
        ./configure --with-tcl=/usr/local/opt/tcl-tk/lib --prefix=/usr/local 
    - name: make
      run: make
    - name: install
      run: sudo make install

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: |
        set -x
        brew update
        brew install tcl-tk || true
        brew install boost || true
        sudo mkdir -p /usr/local
        sudo rm -f /usr/local/lib/libtcl* || true
        sudo ln -sf /usr/local/opt/tcl-tk/include /usr/local/include/tcl8.6
        sudo cp /usr/local/opt/tcl-tk/lib/libtcl* /usr/local/lib
        sudo ln -sf /usr/local/opt/tcl-tk/bin/tclsh8.6 /usr/local/bin/tclsh
        sudo ln -sf /usr/local/opt/tcl-tk/bin/tclsh8.6 /usr/local/bin/tclsh8.6
    - name: configure
      run: |       
        autoreconf -vi
        ./configure --with-tcl=/usr/local/opt/tcl-tk/lib --prefix=/usr/local 
    - name: make
      run: make
    - name: install
      run: sudo make install

Remove /usr/local/lib/libtcl before copying it in again.
Remove /usr/local/lib/libtcl before copying it in again.
