Skip to content

Commit

Permalink
[BE] Use reusable workflows from test-infra (pytorch#86035)
Browse files Browse the repository at this point in the history
Instead of local copies, use workflows checked into test-infra by pytorch/test-infra#783

Thought about deleting the actions later, but if I understand how GHA merges work, older PRs merged onto this changes should not cause any problems as it will immediately reference actions from test-infra
Pull Request resolved: pytorch#86035
Approved by: https://github.com/kit1980
  • Loading branch information
malfet authored and pytorchmergebot committed Oct 1, 2022
1 parent 92c2295 commit fe89cd6
Show file tree
Hide file tree
Showing 20 changed files with 48 additions and 126 deletions.
23 changes: 0 additions & 23 deletions .github/actions/pull-docker-image/action.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/actions/setup-ssh/action.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/actions/teardown-linux/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/templates/linux_binary_build_workflow.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
run: |
echo "GPU_FLAG=--device=/dev/mem --device=/dev/kfd --device=/dev/dri --group-add video --group-add daemon" >> "${GITHUB_ENV}"
- name: Pull Docker image
uses: ./pytorch/.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: !{{ config["container_image"] }}
- name: Test Pytorch binary
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/_android-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: ./.github/actions/setup-linux

- name: Setup SSH (Click me for login details)
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -48,7 +48,7 @@ jobs:
xla: ${{ contains(inputs.build-environment, 'xla') }}

- name: Pull docker image
uses: ./.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }}

Expand Down Expand Up @@ -112,5 +112,5 @@ jobs:
if: always()

- name: Teardown Linux
uses: ./.github/actions/teardown-linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main
if: always()
6 changes: 3 additions & 3 deletions .github/workflows/_android-full-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: ./.github/actions/setup-linux

- name: Setup SSH (Click me for login details)
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -47,7 +47,7 @@ jobs:
docker-image-name: ${{ inputs.docker-image-name }}

- name: Pull docker image
uses: ./.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }}

Expand Down Expand Up @@ -156,5 +156,5 @@ jobs:
if: always()

- name: Teardown Linux
uses: ./.github/actions/teardown-linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main
if: always()
6 changes: 3 additions & 3 deletions .github/workflows/_bazel-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: ./.github/actions/setup-linux

- name: Setup SSH (Click me for login details)
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -47,7 +47,7 @@ jobs:
docker-image-name: ${{ inputs.docker-image-name }}

- name: Pull docker image
uses: ./.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }}

Expand Down Expand Up @@ -197,5 +197,5 @@ jobs:
python3 -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
- name: Teardown Linux
uses: ./.github/actions/teardown-linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main
if: always()
6 changes: 3 additions & 3 deletions .github/workflows/_binary-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Chown workspace
uses: ./.github/actions/chown-workspace
- name: "[FB EMPLOYEES] Enable SSH (Click me for login details)"
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.github-token }}
- name: Clean workspace
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
run: |
echo "BUILD_SPLIT_CUDA='ON'" >> "$GITHUB_ENV"
- name: Pull Docker image
uses: ./pytorch/.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: ${{ inputs.DOCKER_IMAGE }}
- name: Build PyTorch binary
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:

- name: Teardown Linux
if: always()
uses: ./pytorch/.github/actions/teardown-linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main

- name: Chown workspace
if: always()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/_binary-test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
- name: Chown workspace
uses: ./.github/actions/chown-workspace
- name: "[FB EMPLOYEES] Enable SSH (Click me for login details)"
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.github-token }}
- name: Clean workspace
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
popd
- name: Pull Docker image
uses: ./pytorch/.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: ${{ inputs.DOCKER_IMAGE }}

Expand All @@ -193,7 +193,7 @@ jobs:

- name: Teardown Linux
if: always()
uses: ./pytorch/.github/actions/teardown-linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main

- name: Chown workspace
if: always()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ jobs:
uses: ./.github/actions/setup-linux

- name: Setup SSH (Click me for login details)
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}

- name: Pull docker image
uses: ./.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: ${{ inputs.docker-image }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/_linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
uses: ./.github/actions/setup-linux

- name: Setup SSH (Click me for login details)
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -83,7 +83,7 @@ jobs:
xla: ${{ contains(inputs.build-environment, 'xla') }}

- name: Pull docker image
uses: ./.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }}

Expand Down Expand Up @@ -179,5 +179,5 @@ jobs:
path: sccache-stats-*.json

- name: Teardown Linux
uses: ./.github/actions/teardown-linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main
if: always()
6 changes: 3 additions & 3 deletions .github/workflows/_linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ jobs:
uses: ./.github/actions/setup-linux

- name: Setup SSH (Click me for login details)
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}

- name: Pull docker image
uses: ./.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: ${{ inputs.docker-image }}

Expand Down Expand Up @@ -247,5 +247,5 @@ jobs:
python3 -m tools.stats.print_test_stats --upload-to-s3 --compare-with-s3 test
- name: Teardown Linux
uses: ./.github/actions/teardown-linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main
if: always()
2 changes: 1 addition & 1 deletion .github/workflows/_rocm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
uses: ./.github/actions/setup-rocm

- name: Pull docker image
uses: ./.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: ${{ inputs.docker-image }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_win-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
cuda-version: ${{ inputs.cuda-version }}

- name: Setup SSH (Click me for login details)
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_win-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
cuda-version: ${{ inputs.cuda-version }}

- name: Setup SSH (Click me for login details)
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docker-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
push-ghcr-image: ${{ github.event_name == 'push' }}

- name: Pull docker image
uses: ./.github/actions/pull-docker-image
uses: pytorch/test-infra/.github/actions/pull-docker-image@main
with:
docker-image: ${{ steps.build-docker-image.outputs.docker-image }}

Expand All @@ -90,5 +90,6 @@ jobs:
if: always()

- name: Teardown Linux
uses: ./.github/actions/teardown-linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main

if: always()
4 changes: 2 additions & 2 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Setup Linux
uses: ./.github/actions/setup-linux
- name: Setup SSH (Click me for login details)
uses: ./.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GitHub Container Registry
Expand Down Expand Up @@ -85,5 +85,5 @@ jobs:
run: |
make -f docker.Makefile "${BUILD_IMAGE_TYPE}-image"
- name: Teardown Linux
uses: ./.github/actions/teardown-linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main
if: always()

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fe89cd6

Please sign in to comment.