-
Notifications
You must be signed in to change notification settings - Fork 1.1k
59 lines (53 loc) · 1.91 KB
/
Copy pathwindows-msvc.yml
File metadata and controls
59 lines (53 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
}"