Skip to content

Commit d8d4dc0

Browse files
committed
Revert "Disable running slow CI for doc-only changes (#9072)"
This reverts commit 8d9e34b.
1 parent edc1a88 commit d8d4dc0

10 files changed

+19
-273
lines changed

.github/workflows/_build_plugin.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ on:
1616
type: number
1717
description: Timeout in minutes for the build job
1818
default: 120
19-
has_code_changes:
20-
required: false
21-
type: string
22-
description: Whether to run full workflow or not
23-
default: 'true'
2419
secrets:
2520
gcloud-service-key:
2621
required: true
@@ -37,31 +32,23 @@ jobs:
3732
BAZEL_REMOTE_CACHE: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
3833
steps:
3934
- name: Checkout actions
40-
if: inputs.has_code_changes == 'true'
4135
uses: actions/checkout@v4
4236
with:
4337
sparse-checkout: |
4438
.github/workflows/setup
4539
path: .actions
4640
- name: Setup
47-
if: inputs.has_code_changes == 'true'
4841
uses: ./.actions/.github/workflows/setup
4942
with:
5043
torch-commit: ${{ inputs.torch-commit }}
5144
cuda: true
5245
- name: Build
53-
if: inputs.has_code_changes == 'true'
5446
shell: bash
5547
run: |
5648
cd pytorch/xla/infra/ansible
5749
ansible-playbook playbook.yaml -vvv -e "stage=build_plugin arch=amd64 accelerator=cuda cuda_compute_capabilities=5.2,7.5,8.6 src_root=${GITHUB_WORKSPACE} cache_suffix=-ci" --skip-tags=fetch_srcs,install_deps
5850
- name: Upload wheel
59-
if: inputs.has_code_changes == 'true'
6051
uses: actions/upload-artifact@v4
6152
with:
6253
name: cuda-plugin
6354
path: /dist/*.whl
64-
- name: Report no code changes
65-
if: inputs.has_code_changes == 'false'
66-
run: |
67-
echo "No code changes were detected that require running the full test suite."

.github/workflows/_build_torch_with_cuda.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ on:
2020
type: number
2121
description: Timeout in minutes for the build job
2222
default: 120
23-
has_code_changes:
24-
required: false
25-
type: string
26-
description: Whether to run full workflow or not
27-
default: 'true'
2823
jobs:
2924
build:
3025
runs-on: ${{ inputs.runner }}
@@ -38,31 +33,23 @@ jobs:
3833
MAX_JOBS: 24
3934
steps:
4035
- name: Checkout actions
41-
if: inputs.has_code_changes == 'true'
4236
uses: actions/checkout@v4
4337
with:
4438
sparse-checkout: |
4539
.github/workflows/setup
4640
path: .actions
4741
- name: Setup
48-
if: inputs.has_code_changes == 'true'
4942
uses: ./.actions/.github/workflows/setup
5043
with:
5144
torch-commit: ${{ inputs.torch-commit }}
5245
cuda: true
5346
- name: Build PyTorch with CUDA enabled
54-
if: inputs.has_code_changes == 'true'
5547
shell: bash
5648
run: |
5749
cd pytorch
5850
python setup.py bdist_wheel
5951
- name: Upload wheel
60-
if: inputs.has_code_changes == 'true'
6152
uses: actions/upload-artifact@v4
6253
with:
6354
name: torch-with-cuda
6455
path: pytorch/dist/*.whl
65-
- name: Report no code changes
66-
if: inputs.has_code_changes == 'false'
67-
run: |
68-
echo "No code changes were detected that require running the full test suite."

.github/workflows/_build_torch_xla.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ on:
2020
type: number
2121
description: Timeout in minutes for the build job
2222
default: 120
23-
has_code_changes:
24-
required: false
25-
type: string
26-
description: Whether to run full workflow or not
27-
default: 'true'
2823
secrets:
2924
gcloud-service-key:
3025
required: true
@@ -44,37 +39,27 @@ jobs:
4439
# Need to check out local composite actions before using them
4540
# https://github.com/orgs/community/discussions/11771
4641
- name: Checkout actions
47-
if: inputs.has_code_changes == 'true'
4842
uses: actions/checkout@v4
4943
with:
5044
sparse-checkout: |
5145
.github/workflows/setup
5246
path: .actions
5347
- name: Setup
54-
if: inputs.has_code_changes == 'true'
5548
uses: ./.actions/.github/workflows/setup
5649
with:
5750
torch-commit: ${{ inputs.torch-commit }}
5851
- name: Build
59-
if: inputs.has_code_changes == 'true'
6052
shell: bash
6153
run: |
6254
cd pytorch/xla/infra/ansible
6355
ansible-playbook playbook.yaml -vvv -e "stage=build arch=amd64 accelerator=tpu src_root=${GITHUB_WORKSPACE} bundle_libtpu=0 build_cpp_tests=1 git_versioned_xla_build=1 cache_suffix=-ci" --skip-tags=fetch_srcs,install_deps
6456
- name: Upload wheel
65-
if: inputs.has_code_changes == 'true'
6657
uses: actions/upload-artifact@v4
6758
with:
6859
name: torch-xla-wheels
6960
path: /dist/*.whl
7061
- name: Upload CPP test binaries
71-
if: inputs.has_code_changes == 'true'
7262
uses: actions/upload-artifact@v4
7363
with:
7464
name: cpp-test-bin
7565
path: /tmp/test/bin
76-
- name: Report no code changes
77-
if: inputs.has_code_changes == 'false'
78-
run: |
79-
echo "No code changes were detected that require running the full test suite."
80-

.github/workflows/_check_code_changes.yml

Lines changed: 0 additions & 111 deletions
This file was deleted.

.github/workflows/_test.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ on:
3232
required: true
3333
type: string
3434
description: torch-commit
35-
has_code_changes:
36-
required: false
37-
type: string
38-
description: Whether to run full workflow or not
39-
default: 'true'
35+
4036
secrets:
4137
gcloud-service-key:
4238
required: true
@@ -46,7 +42,7 @@ jobs:
4642
runs-on: ${{ inputs.runner }}
4743
container:
4844
image: ${{ inputs.dev-image }}
49-
options: "${{ inputs.install-cuda-plugin == true && '--gpus all' || '' }} --shm-size 16g"
45+
options: "${{ inputs.install-cuda-plugin && '--gpus all' || '' }} --shm-size 16g"
5046
strategy:
5147
fail-fast: false
5248
matrix:
@@ -82,57 +78,51 @@ jobs:
8278
BAZEL_REMOTE_CACHE: 1
8379
steps:
8480
- name: Checkout actions
85-
if: inputs.has_code_changes == 'true'
8681
uses: actions/checkout@v4
8782
with:
8883
sparse-checkout: |
8984
.github/workflows/setup
9085
path: .actions
9186
- name: Setup
92-
if: inputs.has_code_changes == 'true'
9387
uses: ./.actions/.github/workflows/setup
9488
with:
9589
torch-commit: ${{ inputs.torch-commit }}
9690
cuda: ${{ inputs.install-cuda-plugin && true || false }}
9791
wheels-artifact: torch-xla-wheels
9892
cuda-plugin-artifact: ${{ inputs.install-cuda-plugin && 'cuda-plugin' || null }}
9993
- name: Fetch CPP test binaries
100-
if: inputs.has_code_changes == 'true' && matrix.run_cpp_tests
10194
uses: actions/download-artifact@v4
10295
with:
10396
name: cpp-test-bin
10497
path: /tmp/test/bin
98+
if: ${{ matrix.run_cpp_tests }}
10599
# GitHub Actions doesn't preserve executable permissions
106100
# https://github.com/actions/download-artifact?tab=readme-ov-file#permission-loss
107101
- name: Set CPP test permissions
108-
if: inputs.has_code_changes == 'true' && matrix.run_cpp_tests
109102
run: |
110103
chmod +x /tmp/test/bin/*
111104
ls -l /tmp/test/bin
105+
if: ${{ matrix.run_cpp_tests }}
112106
- name: Check GPU
113-
if: inputs.has_code_changes == 'true' && inputs.install-cuda-plugin
114107
run: nvidia-smi
108+
if: ${{ inputs.install-cuda-plugin }}
115109
- name: Install test deps
116-
if: inputs.has_code_changes == 'true'
117110
shell: bash
118111
run: |
119112
# TODO: Add these in setup.py
120113
pip install fsspec
121114
pip install rich
122115
- name: Checkout PyTorch Repo
123-
if: inputs.has_code_changes == 'true'
124116
uses: actions/checkout@v4
125117
with:
126118
repository: pytorch/pytorch
127119
path: pytorch
128120
ref: ${{ inputs.torch-commit }}
129121
- name: Checkout PyTorch/XLA Repo
130-
if: inputs.has_code_changes == 'true'
131122
uses: actions/checkout@v4
132123
with:
133124
path: pytorch/xla
134125
- name: Extra CI deps
135-
if: inputs.has_code_changes == 'true'
136126
shell: bash
137127
run: |
138128
set -x
@@ -143,11 +133,10 @@ jobs:
143133
pip install -r pytorch/xla/benchmarks/requirements.txt
144134
fi
145135
- name: Test
146-
if: inputs.has_code_changes == 'true'
147136
shell: bash
148137
run: pytorch/xla/.github/scripts/run_tests.sh pytorch/ pytorch/xla/ $USE_COVERAGE
149138
- name: Upload coverage results
150-
if: inputs.has_code_changes == 'true' && inputs.collect-coverage
139+
if: ${{ inputs.collect-coverage }}
151140
shell: bash
152141
env:
153142
CIRCLE_WORKFLOW_ID: ${{ github.run_id }}
@@ -191,7 +180,3 @@ jobs:
191180
gsutil cp inc_metadata.json gs://ng3-metrics/ng3-pytorchxla-coverage/incremental/pytorchxla/${CIRCLE_WORKFLOW_ID}/metadata.json
192181
fi
193182
fi
194-
- name: Report no code changes
195-
if: inputs.has_code_changes == 'false'
196-
run: |
197-
echo "No code changes were detected that require running the full test suite."

0 commit comments

Comments
 (0)