Skip to content

Commit

Permalink
Fix the wrong upload of vs2019 conda package on Windows (#4893)
Browse files Browse the repository at this point in the history
In the new setup, the conda upload job will just upload any `tar.bz2`
packages it finds because it doesn't have any additional information
about the target. This leads to the wrong and duplicated upload of
vs2019 conda package in Windows build job, i.e.
https://github.com/pytorch/vision/actions/runs/7555102811/job/20584135167#step:7:170.

I'm not sure what's the best way to fix this here, but removing this
file explicitly helps. Also, this only happens on Windows.
  • Loading branch information
huydhn authored Jan 17, 2024
1 parent a54dfef commit 80aff55
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build_conda_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ jobs:
working-directory: ${{ inputs.repository }}
env:
CUDATOOLKIT_CHANNEL: ${{ env.CUDATOOLKIT_CHANNEL }}
PACKAGE_NAME: ${{ inputs.package-name }}
run: |
set -euxo pipefail
cat "${BUILD_ENV_FILE}"
Expand All @@ -169,6 +170,14 @@ jobs:
--no-test --python "${PYTHON_VERSION}" \
--output-folder distr/ \
"${CONDA_PACKAGE_DIRECTORY}"
# This is to remove the vs20xx conda package that sneaks into distr
for pkg in distr/**/*.tar.bz2; do
if [[ "${pkg}" != *"${PACKAGE_NAME}"* ]]; then
rm -f "${pkg}"
fi
done
- name: Upload artifact to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 80aff55

Please sign in to comment.