name: run units target on NetBSD

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

jobs:
  testing:
    runs-on: macos-10.15
    
    steps:
    - uses: actions/checkout@v2

    - uses: leleliu008/github-actions-vagrant@v2
      with:
        mem: 2048
        box: generic/netbsd9
        log: debug
        run: |
          run sudo pkgin -y install mozilla-rootcerts automake autoconf pkg-config gmake

          run sudo mozilla-rootcerts install

          run cc --version

          run ./autogen.sh
          run ./configure --prefix=/usr
          run gmake
          run sudo gmake install
          run file /usr/bin/ctags
          run ctags --version
          # bugs to fix
          #run make check CI=gha+vagrant+netbsd
          run gmake roundtrip CI=gha+vagrant+netbsd
