Skip to content

Commit bc919cc

Browse files
committed
Try to build from source
1 parent ff91aca commit bc919cc

1 file changed

Lines changed: 40 additions & 39 deletions

File tree

.github/workflows/windows_wheel.yaml

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,29 @@ jobs:
3737
with-cuda: disable
3838
build-python-only: "disable"
3939

40-
build:
41-
needs: generate-matrix
42-
strategy:
43-
fail-fast: false
44-
name: Build and Upload Windows wheel
45-
# TODO: use @main
46-
uses: nicolashug/test-infra/.github/workflows/build_wheels_windows.yml@build-platform-windows
47-
with:
48-
repository: pytorch/torchcodec
49-
ref: ""
50-
test-infra-repository: nicolashug/test-infra
51-
test-infra-ref: build-platform-windows
52-
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
53-
pre-script: packaging/pre_build_script.sh
54-
# post-script: packaging/post_build_script.sh TODO: consider enabling post-build checks for Windows
55-
env-script: packaging/vc_env_helper.bat
56-
smoke-test-script: packaging/fake_smoke_test.py
57-
package-name: torchcodec
58-
trigger-event: ${{ github.event_name }}
59-
build-platform: "python-build-package"
60-
# The BUILD_AGAINST_ALL_FFMPEG_FROM_S3 var, needed to build the wheel, is
61-
# set in vc_env_helper.bat Couldn't find a way to set it from here.
62-
build-command: "python -m build --wheel -vvv --no-isolation"
40+
# build:
41+
# needs: generate-matrix
42+
# strategy:
43+
# fail-fast: false
44+
# name: Build and Upload Windows wheel
45+
# # TODO: use @main
46+
# uses: nicolashug/test-infra/.github/workflows/build_wheels_windows.yml@build-platform-windows
47+
# with:
48+
# repository: pytorch/torchcodec
49+
# ref: ""
50+
# test-infra-repository: nicolashug/test-infra
51+
# test-infra-ref: build-platform-windows
52+
# build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
53+
# pre-script: packaging/pre_build_script.sh
54+
# # post-script: packaging/post_build_script.sh TODO: consider enabling post-build checks for Windows
55+
# env-script: packaging/vc_env_helper.bat
56+
# smoke-test-script: packaging/fake_smoke_test.py
57+
# package-name: torchcodec
58+
# trigger-event: ${{ github.event_name }}
59+
# build-platform: "python-build-package"
60+
# # The BUILD_AGAINST_ALL_FFMPEG_FROM_S3 var, needed to build the wheel, is
61+
# # set in vc_env_helper.bat Couldn't find a way to set it from here.
62+
# build-command: "python -m build --wheel -vvv --no-isolation"
6363

6464
# install-and-test:
6565
# runs-on: windows-latest
@@ -161,7 +161,8 @@ jobs:
161161
# gpu-arch-type: cuda
162162
# gpu-arch-version: "11.8"
163163
fail-fast: false
164-
needs: build
164+
# needs: build
165+
needs: generate-matrix ## TODO REMOVE
165166
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
166167
permissions:
167168
id-token: write
@@ -194,26 +195,26 @@ jobs:
194195
195196
conda activate ci
196197
197-
# Download and install wheel
198+
# Install PyTorch
198199
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
199-
wheel_path=$(find pytorch/torchcodec/dist -type f -name "*${{ matrix.python-version }}*.whl" | head -1)
200-
echo "Installing $wheel_path"
201-
python -m pip install "$wheel_path" -vvv
202-
203-
# Install FFmpeg and test dependencies
204-
conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
205-
conda_env_path=$(conda info --base)/envs/test
200+
201+
# Install build dependencies
202+
conda install cmake pkg-config pybind11 "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
203+
204+
# Ensure FFmpeg DLLs are in PATH for Windows
205+
conda_env_path=$(conda info --base)/envs/ci
206206
library_bin_path="$conda_env_path/Library/bin"
207+
echo "Adding conda Library/bin to PATH: $library_bin_path"
207208
echo "$library_bin_path" >> $GITHUB_PATH
208209
209-
# Install test dependencies
210-
python -m pip install numpy pytest pillow
211-
210+
# Verify FFmpeg is available
211+
ffmpeg -version
212+
213+
# Install torchcodec from source in development mode
214+
pip install -e ".[dev]" --no-build-isolation -vv
215+
212216
# Test torchcodec import
213217
python -c "import torchcodec; print('TorchCodec import successful!')"
214-
215-
# Remove source to ensure testing against wheel
216-
rm -rf src/
217-
218+
218219
# Run tests
219220
pytest test -vvv

0 commit comments

Comments
 (0)