Skip to content

Commit 0be6336

Browse files
committed
try to add Library/bin to PATH??
1 parent 7fb6536 commit 0be6336

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/windows_wheel.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,26 @@ jobs:
107107
conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
108108
ffmpeg -version
109109
110+
# On Windows, ensure the conda Library/bin directory is in PATH
111+
# This is needed for Windows DLL loading to find FFmpeg DLLs
112+
if [[ "$RUNNER_OS" == "Windows" ]]; then
113+
conda_env_path=$(conda info --base)/envs/test
114+
library_bin_path="$conda_env_path/Library/bin"
115+
echo "Adding conda Library/bin to PATH: $library_bin_path"
116+
echo "$library_bin_path" >> $GITHUB_PATH
117+
118+
# Verify FFmpeg DLLs are accessible
119+
echo "Checking if FFmpeg DLLs are in PATH:"
120+
where avutil.dll || echo "avutil.dll not found in PATH"
121+
where avcodec.dll || echo "avcodec.dll not found in PATH"
122+
where avformat.dll || echo "avformat.dll not found in PATH"
123+
fi
124+
125+
- name: Test torchcodec import after FFmpeg installation
126+
run: |
127+
echo "Testing torchcodec import after FFmpeg is installed and PATH is updated..."
128+
python -c "import torchcodec; print('TorchCodec import successful!')"
129+
110130
- name: Install test dependencies
111131
run: |
112132
# Ideally we would find a way to get those dependencies from pyproject.toml

0 commit comments

Comments
 (0)