Skip to content

CI: cache SwiftShader prebuilt to skip per-run from-source build #7099

CI: cache SwiftShader prebuilt to skip per-run from-source build

CI: cache SwiftShader prebuilt to skip per-run from-source build #7099

Workflow file for this run

name: Windows MSVC Build
on:
push:
branches:
- main
- release/*
tags:
- ciflow/trunk/*
pull_request:
paths:
- .ci/docker/ci_commit_pins/pytorch.txt
- .ci/scripts/**
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
cancel-in-progress: true
permissions:
contents: read
jobs:
changed-files:
name: Get changed files
uses: ./.github/workflows/_get-changed-files.yml
with:
include-push-diff: true
run-decision:
name: CI run decision
uses: ./.github/workflows/_ci-run-decision.yml
build-windows-msvc:
name: build-windows-msvc
needs: [changed-files, run-decision]
# Path-filtered: mirrors the workflow-level pull_request `paths:`
# filter above, so push commits that don't touch these paths skip
# this job on non-sampled commits. See _ci-run-decision.yml for
# the sampling policy.
if: |
contains(needs.changed-files.outputs.changed-files, '.ci/docker/ci_commit_pins/pytorch.txt') ||
contains(needs.changed-files.outputs.changed-files, '.ci/scripts/') ||
contains(needs.changed-files.outputs.changed-files, '.github/workflows/windows-msvc.yml') ||
needs.run-decision.outputs.is-full-run == 'true'
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 60
script: |
git config --global http.sslBackend openssl
git submodule update --init --recursive
conda init powershell
powershell -Command "& {
Set-PSDebug -Trace 1
\$ErrorActionPreference = 'Stop'
\$PSNativeCommandUseErrorActionPreference = \$true
.ci/scripts/setup-windows-msvc.ps1
}"