diff --git a/.github/workflows/build-conda-macos.yml b/.github/workflows/build-conda-macos.yml new file mode 100644 index 000000000..19e9500fe --- /dev/null +++ b/.github/workflows/build-conda-macos.yml @@ -0,0 +1,43 @@ +name: Build Macos Conda + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: conda + os: macos + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + name: pytorch/data + uses: pytorch/test-infra/.github/workflows/build_conda_macos.yml@main + with: + conda-package-directory: packaging/torchdata + repository: pytorch/data + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: "" + post-script: "" + package-name: torchdata + env-var-script: packaging/env-var-script.txt + smoke-test-script: test/smoke_test/smoke_test.py + runner-type: macos-12 + trigger-event: dev + secrets: + CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} diff --git a/.github/workflows/build-wheels-macos.yml b/.github/workflows/build-wheels-macos.yml new file mode 100644 index 000000000..a4c488481 --- /dev/null +++ b/.github/workflows/build-wheels-macos.yml @@ -0,0 +1,43 @@ +name: Build Macos Wheels + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: wheel + os: macos + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + name: pytorch/data + uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main + with: + repository: pytorch/data + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: pre_build_script_macos.sh + post-script: "" + package-name: torchdata + env-var-script: packaging/env-var-script.txt + runner-type: macos-12 + smoke-test-script: test/smoke_test/smoke_test.py + trigger-event: dev + secrets: + AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} + AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} diff --git a/packaging/pre_build_script_macos.sh b/packaging/pre_build_script_macos.sh new file mode 100644 index 000000000..962337258 --- /dev/null +++ b/packaging/pre_build_script_macos.sh @@ -0,0 +1,5 @@ +set -euxo pipefail + +pip install cmake ninja +echo "/home/runner/.local/bin" >> "$GITHUB_PATH" +echo $PATH