Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding windows wheel builds #7540

Merged
merged 5 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/build-wheels-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build Windows 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: windows
test-infra-repository: pytorch/test-infra
test-infra-ref: main
build:
needs: generate-matrix
strategy:
fail-fast: false
matrix:
include:
- repository: pytorch/vision
pre-script: packaging/pre_build_script.sh
env-script: packaging/windows/internal/vc_env_helper.bat
post-script: "python packaging/wheel/relocate.py"
smoke-test-script: test/smoke_test.py
package-name: torchvision
name: ${{ matrix.repository }}
uses: pytorch/test-infra/.github/workflows/build_wheels_windows.yml@main
with:
repository: ${{ matrix.repository }}
ref: ""
test-infra-repository: pytorch/test-infra
test-infra-ref: main
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
env-script: ${{ matrix.env-script }}
post-script: ${{ matrix.post-script }}
package-name: ${{ matrix.package-name }}
smoke-test-script: ${{ matrix.smoke-test-script }}
# Using "development" as trigger event so these binaries are not uploaded
# to official channels yet
trigger-event: development
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 }}
9 changes: 6 additions & 3 deletions packaging/pre_build_script.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#!/bin/bash
if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then
# Uninstall Conflicting jpeg brew formulae
if [[ "$(uname)" == Darwin ]]; then
# Uninstall Conflicting jpeg brew formulae
jpeg_packages=$(brew list | grep jpeg)
echo "Existing Jpeg-related Brew libraries"
echo $jpeg_packages
for pkg in $jpeg_packages; do
brew uninstall --ignore-dependencies --force $pkg || true
done

conda install -yq wget
fi

if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then
# Install libpng from Anaconda (defaults)
conda install ${CONDA_CHANNEL_FLAGS} libpng "jpeg<=9b" -y
conda install -yq ffmpeg=4.2 -c pytorch
conda install -yq wget
else
# Install native CentOS libJPEG, freetype and GnuTLS
yum install -y libjpeg-turbo-devel freetype gnutls
Expand Down