name: Native Build MXNet OSX

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: macos-13

    steps:
      - name: Checkout Apache MXNet repository
        uses: actions/checkout@v4
        with:
          repository: apache/incubator-mxnet
          ref: 1.9.1
          submodules: 'recursive'
      - name: Install Dependencies
        run: |
          brew install nasm automake ninja libtool
      - name: Build
        run: |
          git --version
          clang --version
          CMAKE_STATICBUILD=1 ./tools/staticbuild/build.sh cpu
      - name: Upload libmxnet.dylib
        uses: actions/upload-artifact@v3
        with:
          name: libmxnet.dylib
          path: build/libmxnet.dylib
