name: build and run tests

on:
  push:
    branches: [ mob ]

jobs:
  test-x86_64-linux:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v3
    - name: make & test tcc
      run: ./configure && make && make test -k

  test-x86_64-osx:
    runs-on: macos-11
    steps:
    - uses: actions/checkout@v3
    - name: make & test tcc
      run: ./configure && make && make test -k

  test-x86_64-win32:
    runs-on: windows-2019
    steps:
    - uses: actions/checkout@v3
    - name: make & test tcc
      shell: cmd
      run: |
        set MSYS2_PATH_TYPE=inherit
        set MSYSTEM=MINGW64
        set CHERE_INVOKING=yes
        C:\msys64\usr\bin\bash -l -c "./configure && make && make test -k"
