forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 81
181 lines (170 loc) · 6.61 KB
/
Copy pathnightly.yml
File metadata and controls
181 lines (170 loc) · 6.61 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# Owner(s): ["oncall: releng"]
name: nightly
on:
schedule:
- cron: 0 0 * * *
push:
tags:
# NOTE: Doc build pipelines should only get triggered on:
# Major or minor release candidates builds
- v[0-9]+.[0-9]+.0+-rc[0-9]+
# Final RC for major, minor and patch releases
- v[0-9]+.[0-9]+.[0-9]+
- ciflow/nightly/*
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}--${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
actions: read
jobs:
get-label-type:
name: get-label-type
uses: pytorch/pytorch/.github/workflows/_runner-determinator.yml@main
if: ${{ (github.event_name != 'schedule' || github.repository == 'pytorch/pytorch') && github.repository_owner == 'pytorch' }}
with:
triggering_actor: ${{ github.triggering_actor }}
issue_owner: ${{ github.event.pull_request.user.login || github.event.issue.user.login }}
curr_branch: ${{ github.head_ref || github.ref_name }}
curr_ref_type: ${{ github.ref_type }}
check_experiments: arc,lf
link-check:
name: Link checks
needs: get-label-type
uses: ./.github/workflows/_link_check.yml
with:
runner: ${{ needs.get-label-type.outputs.label-type }}
docker-image: 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/ci-image:pytorch-linux-jammy-linter-${{ needs.get-label-type.outputs.ci-docker-hash }}
ref: ${{ github.sha }}
secrets: inherit
docs-build:
name: docs build
uses: ./.github/workflows/_linux-build.yml
needs: get-label-type
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
build-environment: linux-jammy-py3.10-gcc11
docker-image-name: ci-image:pytorch-linux-jammy-py3.10-clang18
ci-docker-hash: ${{ needs.get-label-type.outputs.ci-docker-hash }}
use-arc: true
python-version: "3.10"
compiler: gcc11
secrets: inherit
docs-push:
name: docs push
uses: ./.github/workflows/_docs.yml
needs:
- docs-build
- get-label-type
with:
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
build-environment: linux-jammy-py3.10-gcc11
docker-image: ${{ needs.docs-build.outputs.docker-image }}
push: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || startsWith(github.event.ref, 'refs/tags/v') }}
run-doxygen: true
use-arc: true
python-version: "3.10"
compiler: gcc11
secrets:
GH_PYTORCHBOT_TOKEN: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
update-metamates-rule:
if: github.repository_owner == 'pytorch' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
environment: update-commit-hash
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
token: ${{ secrets.UPDATEBOT_TOKEN }}
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.10'
- name: Install requirements
run: pip install pyyaml==6.0.2
- name: Update metamates rule
env:
GH_TOKEN: ${{ secrets.UPDATEBOT_TOKEN }}
run: |
python .github/scripts/update_metamates_rule.py
- name: Create or update PR
env:
GH_TOKEN: ${{ secrets.UPDATEBOT_TOKEN }}
PYTORCHBOT_TOKEN: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
run: |
if git diff --quiet; then
echo "No changes detected"
exit 0
fi
git config user.name "PyTorch UpdateBot"
git config user.email "pytorchupdatebot@users.noreply.github.com"
BRANCH="update-metamates-rule"
TITLE="Update Metamates merge rule"
EXISTING=$(gh pr list --author pytorchupdatebot --search "$TITLE" --state open --json number --jq '.[0].number')
if [ -n "$EXISTING" ]; then
BRANCH=$(gh pr view "$EXISTING" --json headRefName --jq '.headRefName')
fi
git checkout -b "$BRANCH"
git add .github/merge_rules.yaml
git commit -m "Update Metamates merge rule"
git push --set-upstream origin "$BRANCH" -f
if [ -z "$EXISTING" ]; then
gh pr create \
--title "$TITLE" \
--body "$(cat <<'EOF'
This PR is auto-generated nightly by [this action](https://github.com/pytorch/pytorch/blob/main/.github/workflows/nightly.yml).
Updates the Metamates merge rule with active team members.
EOF
)"
fi
update-commit-hashes:
runs-on: ubuntu-latest
environment: update-commit-hash
strategy:
fail-fast: false
matrix:
include:
- repo-name: vision
repo-owner: pytorch
branch: main
pin-folder: .github/ci_commit_pins
- repo-name: audio
repo-owner: pytorch
branch: main
pin-folder: .github/ci_commit_pins
# executorch jobs are disabled since it needs some manual work for the hash update
# - repo-name: executorch
# repo-owner: pytorch
# branch: main
# pin-folder: .ci/docker/ci_commit_pins
- repo-name: triton
repo-owner: triton-lang
branch: main
pin-folder: .ci/docker/ci_commit_pins
- repo-name: vllm
repo-owner: vllm-project
branch: main
pin-folder: .github/ci_commit_pins
- repo-name: torchtitan
repo-owner: pytorch
branch: main
pin-folder: .github/ci_commit_pins
- repo-name: torchcomms
repo-owner: meta-pytorch
branch: main
pin-folder: .github/ci_commit_pins
# Allow this to be triggered on either a schedule or on workflow_dispatch to allow for easier testing
if: github.repository_owner == 'pytorch' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
steps:
- name: "${{ matrix.repo-owner }}/${{ matrix.repo-name }} update-commit-hash"
uses: pytorch/test-infra/.github/actions/update-commit-hash@main
with:
repo-owner: ${{ matrix.repo-owner }}
repo-name: ${{ matrix.repo-name }}
branch: ${{ matrix.branch }}
pin-folder: ${{ matrix.pin-folder}}
updatebot-token: ${{ secrets.UPDATEBOT_TOKEN }}
pytorchbot-token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}