name: macOS

on: [push, pull_request]

jobs:
  MacOS:
    runs-on: macos-latest
    steps:
    - name: Checkout repository
      uses: actions/checkout@v3
      with:
        fetch-depth: 2
    - name: Checkout submodules
      run: |
        git submodule update --init --recursive
    - name: Install dependencies
      run: |
        brew install wget SDL2 premake
    - name: Build
      run: |
        premake5 gmake2
        make -C make/macosx/ -e config=release_arm64
