From 3ffb2a7a9a6204d331ec4d72bb9ae19f56149c1d Mon Sep 17 00:00:00 2001 From: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com> Date: Mon, 24 Oct 2022 00:24:27 +0800 Subject: [PATCH] Build macOS wheel when updating version info (#2350) * Build macos wheel on 2.x branch * remove env * fix python3.10 can not found error * fix python3.10 can not found error * comment config * trigger on push action --- .github/workflows/build_macos_wheel.yml | 68 +++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/build_macos_wheel.yml diff --git a/.github/workflows/build_macos_wheel.yml b/.github/workflows/build_macos_wheel.yml new file mode 100644 index 0000000000..9b0263b12d --- /dev/null +++ b/.github/workflows/build_macos_wheel.yml @@ -0,0 +1,68 @@ +name: build macos wheel + +on: push + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build_macos10_wheel: + runs-on: macos-10.15 + if: contains(github.event.head_commit.message, 'Bump version to') + strategy: + matrix: + torch: [1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.0, 1.11.0, 1.12.0] + python-version: [3.6, 3.7, 3.8, 3.9, '3.10'] + include: + - torch: 1.6.0 + torchvision: 0.7.0 + - torch: 1.7.0 + torchvision: 0.8.1 + - torch: 1.8.0 + torchvision: 0.9.0 + - torch: 1.9.0 + torchvision: 0.10.0 + - torch: 1.10.0 + torchvision: 0.11.0 + - torch: 1.11.0 + torchvision: 0.12.0 + - torch: 1.12.0 + torchvision: 0.13.0 + exclude: + - torch: 1.6.0 + python-version: 3.9 + - torch: 1.6.0 + python-version: '3.10' + - torch: 1.7.0 + python-version: 3.9 + - torch: 1.7.0 + python-version: '3.10' + - torch: 1.8.0 + python-version: '3.10' + - torch: 1.9.0 + python-version: '3.10' + - torch: 1.10.0 + python-version: '3.10' + - torch: 1.11.0 + python-version: 3.6 + - torch: 1.12.0 + python-version: 3.6 + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install psutil + run: pip install psutil + - name: Install PyTorch + run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} --no-cache-dir + - name: Build and install + run: | + pip install wheel + python setup.py bdist_wheel + - uses: actions/upload-artifact@v3 + with: + name: ${{matrix.torch}} + path: dist/