name: "Solaris build"

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  schedule:
    - cron: '0 7 * * 2'

jobs:
  build:
    runs-on: macos-12

    steps:
    - name: Repository checkout
      uses: actions/checkout@v3

    - name: Test on Solaris 11.4
      uses: vmactions/solaris-vm@v0
      with:
        prepare: |
          pkg install gcc-7
          pkgutil -y -i automake autoconf autoconf_archive libtool pkgconfig libcppunit1_12_1 libcppunit_dev gsed ggrep
        mem: 4096
        run: |
          uname -a
          whoami
          pwd
          cat /etc/release
          PATH=/opt/csw/bin:$PATH
          export PATH
          autoreconf -v --install --force
          ./configure --prefix=/usr
          gmake V=1 -j$(nproc)

