diff --git a/.github/workflows/buildManylinux.yml b/.github/workflows/buildManylinux.yml index d1941c187..384082ead 100644 --- a/.github/workflows/buildManylinux.yml +++ b/.github/workflows/buildManylinux.yml @@ -32,6 +32,24 @@ jobs: python -m pip install wheel ./build_tools/python_deploy/build_linux_packages.sh + name: MacOS Build + runs-on: macos-latest + steps: + - name: Get torch-mlir + uses: actions/checkout@v2 + with: + submodules: 'true' + - uses: ./.github/actions/setup-build + with: + cache-suffix: '' + - name: Build Python wheels and smoke test. + run: | + cd $GITHUB_WORKSPACE + python -m pip install wheel + ./build_tools/python_deploy/install_macos_deps.sh + python_versions="3.9 3.10" ./build_tools/python_deploy/build_macos_packages.sh + + # If we were given a release_id, then upload the package we just built # to the github releases page. - name: Upload Release Assets (if requested) diff --git a/build_tools/python_deploy/build_macos_packages.sh b/build_tools/python_deploy/build_macos_packages.sh index bdff4c2f3..69dc75c1d 100755 --- a/build_tools/python_deploy/build_macos_packages.sh +++ b/build_tools/python_deploy/build_macos_packages.sh @@ -60,18 +60,18 @@ function run() { } function build_torch_mlir() { - python -m pip install -r /main_checkout/torch-mlir/requirements.txt + python -m pip install -r $repo_root/requirements.txt --extra-index-url https://download.pytorch.org/whl/nightly/cpu CMAKE_GENERATOR=Ninja \ MACOSX_DEPLOYMENT_TARGET=11.0 \ CMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ - python -m pip wheel -v -w /wheelhouse /main_checkout/torch-mlir/ + python -m pip wheel -v -w $output_dir $repo_root --extra-index-url https://download.pytorch.org/whl/nightly/cpu } function clean_wheels() { local wheel_basename="$1" local python_version="$2" echo ":::: Clean wheels $wheel_basename $python_version" - rm -f /wheelhouse/${wheel_basename}-*-${python_version}-*.whl + rm -f $output_dir/${wheel_basename}-*-${python_version}-*.whl } run diff --git a/pyproject.toml b/pyproject.toml index f174957ea..dc2e8d88e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,6 @@ requires = [ # artifacts. # TODO: Come up with a better way to pin the version. "numpy", - "torch==1.12.0.dev20220419+cpu", + "torch==1.12.0.dev20220420", ] build-backend = "setuptools.build_meta"