Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly checkout test-infra on Nova _binary_upload job #4882

Merged
merged 3 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/actions/setup-binary-upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@ runs:
# and "/" is not allowed in artifact names
echo "ARTIFACT_NAME=${REPOSITORY/\//_}_${REF}_${PYTHON_VERSION}_${CU_VERSION}_${ARCH}" >> "${GITHUB_ENV}"

# Need to checkout the target repository to run pkg-helpers
- uses: actions/checkout@v3
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
path: ${{ inputs.repository }}

- name: Generate env variables from pytorch_pkg_helpers
working-directory: ${{ inputs.repository }}
shell: bash
env:
REPOSITORY: ${{ inputs.repository }}
Expand All @@ -64,7 +72,7 @@ runs:
run: |
set -ex

python -m pip install tools/pkg-helpers
python -m pip install ${GITHUB_WORKSPACE}/test-infra/tools/pkg-helpers

BUILD_ENV_FILE="${RUNNER_TEMP}/build_env_${GITHUB_RUN_ID}"
python -m pytorch_pkg_helpers > "${BUILD_ENV_FILE}"
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/_binary_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ on:
description: 'Reference to checkout, defaults to "nightly"'
default: 'nightly'
type: string
test-infra-repository:
description: "Test infra repository to use"
default: "pytorch/test-infra"
type: string
test-infra-ref:
description: "Test infra reference to use"
default: ""
type: string
build-matrix:
description: "Build matrix to utilize"
default: ''
Expand All @@ -36,9 +44,13 @@ jobs:
name: ${{ matrix.build_name }}
steps:
- uses: actions/checkout@v3
with:
repository: ${{ inputs.test-infra-repository }}
ref: ${{ inputs.test-infra-ref }}
path: test-infra

# For pytorch_pkg_helpers which we need to run to generate the artifact name and target S3 buckets
- uses: ./.github/actions/setup-binary-upload
- uses: ./test-infra/.github/actions/setup-binary-upload
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
Expand All @@ -47,7 +59,7 @@ jobs:
arch: ${{ inputs.architecture }}
upload-to-base-bucket: ${{ matrix.upload_to_base_bucket }}

- uses: ./.github/actions/set-channel
- uses: ./test-infra/.github/actions/set-channel

- name: Download the artifact
uses: actions/download-artifact@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ jobs:
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
test-infra-repository: ${{ inputs.test-infra-repository }}
test-infra-ref: ${{ inputs.test-infra-ref }}
build-matrix: ${{ inputs.build-matrix }}
architecture: ${{ inputs.architecture }}
trigger-event: ${{ inputs.trigger-event }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build_wheels_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ jobs:
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
test-infra-repository: ${{ inputs.test-infra-repository }}
test-infra-ref: ${{ inputs.test-infra-ref }}
build-matrix: ${{ inputs.build-matrix }}
trigger-event: ${{ inputs.trigger-event }}

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build_wheels_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ jobs:
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
test-infra-repository: ${{ inputs.test-infra-repository }}
test-infra-ref: ${{ inputs.test-infra-ref }}
build-matrix: ${{ inputs.build-matrix }}
trigger-event: ${{ inputs.trigger-event }}

Expand Down
Loading