Skip to content

Commit 058b321

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Adding windows wheel builds (#7540)
Reviewed By: vmoens Differential Revision: D45477044 fbshipit-source-id: 58be7d47f8ef63ec7d18c36dbcf1721a385d3be3
1 parent 9a87060 commit 058b321

File tree

2 files changed

+59
-2
lines changed

2 files changed

+59
-2
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build Windows Wheels
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- nightly
8+
- main
9+
- release/*
10+
tags:
11+
# NOTE: Binary build pipelines should only get triggered on release candidate builds
12+
# Release candidate tags look like: v1.11.0-rc1
13+
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
14+
workflow_dispatch:
15+
16+
jobs:
17+
generate-matrix:
18+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
19+
with:
20+
package-type: wheel
21+
os: windows
22+
test-infra-repository: pytorch/test-infra
23+
test-infra-ref: main
24+
build:
25+
needs: generate-matrix
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
include:
30+
- repository: pytorch/vision
31+
pre-script: packaging/pre_build_script.sh
32+
env-script: packaging/windows/internal/vc_env_helper.bat
33+
post-script: "python packaging/wheel/relocate.py"
34+
smoke-test-script: test/smoke_test.py
35+
package-name: torchvision
36+
name: ${{ matrix.repository }}
37+
uses: pytorch/test-infra/.github/workflows/build_wheels_windows.yml@main
38+
with:
39+
repository: ${{ matrix.repository }}
40+
ref: ""
41+
test-infra-repository: pytorch/test-infra
42+
test-infra-ref: main
43+
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
44+
pre-script: ${{ matrix.pre-script }}
45+
env-script: ${{ matrix.env-script }}
46+
post-script: ${{ matrix.post-script }}
47+
package-name: ${{ matrix.package-name }}
48+
smoke-test-script: ${{ matrix.smoke-test-script }}
49+
# Using "development" as trigger event so these binaries are not uploaded
50+
# to official channels yet
51+
trigger-event: development
52+
secrets:
53+
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
54+
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}

packaging/pre_build_script.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then
2+
if [[ "$(uname)" == Darwin ]]; then
33
# Uninstall Conflicting jpeg brew formulae
44
jpeg_packages=$(brew list | grep jpeg)
55
echo "Existing Jpeg-related Brew libraries"
@@ -8,10 +8,13 @@ if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then
88
brew uninstall --ignore-dependencies --force $pkg || true
99
done
1010

11+
conda install -yq wget
12+
fi
13+
14+
if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then
1115
# Install libpng from Anaconda (defaults)
1216
conda install ${CONDA_CHANNEL_FLAGS} libpng "jpeg<=9b" -y
1317
conda install -yq ffmpeg=4.2 -c pytorch
14-
conda install -yq wget
1518
else
1619
# Install native CentOS libJPEG, freetype and GnuTLS
1720
yum install -y libjpeg-turbo-devel freetype gnutls

0 commit comments

Comments
 (0)