diff --git a/.github/workflows/build_wheel_windows_arm64.yml b/.github/workflows/build_wheel_windows_arm64.yml new file mode 100644 index 00000000000..e67f566781e --- /dev/null +++ b/.github/workflows/build_wheel_windows_arm64.yml @@ -0,0 +1,53 @@ +name: Build Windows ARM64 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: + +permissions: + id-token: write + contents: read + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: wheel + os: windows-arm64 + test-infra-repository: pytorch/test-infra + test-infra-ref: main + with-cuda: disable + + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/vision + smoke-test-script: test/smoke_test.py + pre-script: packaging/pre_build_script_arm64.sh + package-name: torchvision + architecture: "arm64" + 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 + pre-script: ${{ matrix.pre-script }} + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + architecture: ${{ matrix.architecture }} diff --git a/packaging/pre_build_script_arm64.sh b/packaging/pre_build_script_arm64.sh index f7841aa21e5..29c2150300d 100644 --- a/packaging/pre_build_script_arm64.sh +++ b/packaging/pre_build_script_arm64.sh @@ -26,6 +26,7 @@ cd vcpkg || exit ./bootstrap-vcpkg.sh # Set vcpkg to only build release packages + echo "set(VCPKG_BUILD_TYPE release)" >> "$TRIPLET_FILE" # Install dependencies using vcpkg @@ -34,6 +35,7 @@ echo "set(VCPKG_BUILD_TYPE release)" >> "$TRIPLET_FILE" ./vcpkg install libpng[tools]:arm64-windows --x-install-root="$DEPENDENCIES_DIR" # Copy files using cp + cp "$DEPENDENCIES_DIR/arm64-windows/lib/libpng16.lib" "$DEPENDENCIES_DIR/arm64-windows/lib/libpng.lib" cp "$DEPENDENCIES_DIR/arm64-windows/bin/libpng16.dll" "$DEPENDENCIES_DIR/arm64-windows/bin/libpng.dll" cp "$DEPENDENCIES_DIR/arm64-windows/bin/libpng16.pdb" "$DEPENDENCIES_DIR/arm64-windows/bin/libpng.pdb"