Skip to content

Build Windows CPU wheel #753

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

Merged
merged 59 commits into from
Aug 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3b55fb9
Windows makefile
NicolasHug Jul 4, 2025
3a20ace
Fix
NicolasHug Jul 4, 2025
02a998d
Add Windows workflow
NicolasHug Jul 4, 2025
4af56ad
Fix ?
NicolasHug Jul 4, 2025
95bd9b2
tmp
NicolasHug Jul 4, 2025
9b3d6e4
Try to use custom test-infra branch
NicolasHug Jul 4, 2025
18f78ab
dont use env helper?
NicolasHug Jul 4, 2025
c814edf
Hmm?
NicolasHug Jul 4, 2025
a25882e
reorder
NicolasHug Jul 4, 2025
b46e5ac
Try something
NicolasHug Jul 4, 2025
c6c30ce
Comment-out some workflows
NicolasHug Jul 5, 2025
8930df5
Remove compilation flags
NicolasHug Jul 5, 2025
db0d342
rework flags
NicolasHug Jul 5, 2025
059c925
Remove some flags
NicolasHug Jul 5, 2025
46d4df5
Add RUNTIME destination for windows
NicolasHug Jul 5, 2025
4ebd78a
Set output dirs to CMAKE_CURRENT_BINARY_DIR for Windows
NicolasHug Jul 5, 2025
43c9e4f
Add comment
NicolasHug Jul 5, 2025
41b90f4
Disable post-build-script for Windows
NicolasHug Jul 5, 2025
8c0bc38
Fix expected wheel artifact name
NicolasHug Jul 5, 2025
cbbd34f
Update .github/workflows/windows_wheel.yaml
NicolasHug Jul 5, 2025
2ccb7ee
Update .github/workflows/windows_wheel.yaml
NicolasHug Jul 5, 2025
a06060a
fix extension finder
NicolasHug Jul 5, 2025
2791490
Merge branch 'add-windows-cmake' of github.com:NicolasHug/torchcodec …
NicolasHug Jul 5, 2025
7fb6536
maybe fix something
NicolasHug Jul 6, 2025
0be6336
try to add Library/bin to PATH??
NicolasHug Jul 6, 2025
5b98275
Add build and test from source workflow
NicolasHug Jul 6, 2025
a1ba873
Fix FFmpeg versions for source build
NicolasHug Jul 6, 2025
f61971b
Try random things
NicolasHug Jul 6, 2025
2f2a38a
Add quiet flags
NicolasHug Jul 7, 2025
c570edb
print dependencies of all libs
NicolasHug Jul 7, 2025
821982f
Crazy stuff
NicolasHug Jul 7, 2025
af7a98a
crazy cmake stuff
NicolasHug Jul 7, 2025
1413666
????
NicolasHug Jul 7, 2025
eb8b318
???
NicolasHug Jul 7, 2025
edca0c3
typo
NicolasHug Jul 7, 2025
952ca7d
Merge branch 'main' of github.com:pytorch/torchcodec into add-windows…
NicolasHug Aug 3, 2025
fd1d8b9
Remove some stuff
NicolasHug Aug 3, 2025
775753e
Fixed botched merge?
NicolasHug Aug 3, 2025
1098307
Fix cudawheelstuff
NicolasHug Aug 3, 2025
57f91fb
remove test job
NicolasHug Aug 3, 2025
9bfc416
Compact cmake defs
NicolasHug Aug 3, 2025
d73d468
cleaner platform detection
NicolasHug Aug 3, 2025
0e734c8
move
NicolasHug Aug 3, 2025
78ff70e
Nits
NicolasHug Aug 3, 2025
847bcc5
refac
NicolasHug Aug 3, 2025
7280276
reducxe diff
NicolasHug Aug 3, 2025
9428b42
nit
NicolasHug Aug 3, 2025
eaae823
Fix LINUX
NicolasHug Aug 3, 2025
9664d89
Remove changes to setuppy
NicolasHug Aug 3, 2025
4bab88c
Update compilation flags
NicolasHug Aug 3, 2025
af81e5f
Set BUILD_AGAINST_ALL_FFMPEG_FROM_S3 here
NicolasHug Aug 3, 2025
9f63e0c
Avoid splitting?
NicolasHug Aug 3, 2025
bc08cde
Try something else
NicolasHug Aug 3, 2025
80bafe6
Try something else
NicolasHug Aug 3, 2025
09ec7f3
Pass variable through env helper
NicolasHug Aug 3, 2025
2bb8ac9
Comments
NicolasHug Aug 3, 2025
457b0ec
put back lint job
NicolasHug Aug 3, 2025
f24caf6
Use official test-infra instead of mine
NicolasHug Aug 4, 2025
62a3658
Revert "Use official test-infra instead of mine"
NicolasHug Aug 4, 2025
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
Prev Previous commit
Next Next commit
maybe fix something
  • Loading branch information
NicolasHug committed Jul 6, 2025
commit 7fb6536e4f96e991c4afa87c95344148350b8b15
3 changes: 3 additions & 0 deletions .github/workflows/windows_wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
strategy:
fail-fast: false
name: Build and Upload Windows wheel
# TODO
# We shouldn't use this, but this is needed for now. Note that this is where we are setting the BUILD_AGAINST_ALL_FFMPEG_FROM_S3 variable currently, we'll have to find a way around that.
uses: nicolashug/test-infra/.github/workflows/build_wheels_windows.yml@build-platform-windows
Copy link
Member Author

@NicolasHug NicolasHug Aug 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll be able to use @main when pytorch/test-infra#6888 is merged. Reviewer, please assume pytorch/test-infra#6888 is accepted and merged when reviewing this PR (753)

with:
repository: pytorch/torchcodec
Expand All @@ -57,6 +59,7 @@ jobs:
trigger-event: ${{ github.event_name }}
build-platform: "python-build-package"
# build-command: "BUILD_AGAINST_ALL_FFMPEG_FROM_S3=1 python -m build --wheel -vvv --no-isolation"
# TODO see comment above
build-command: "python -m build --wheel -vvv --no-isolation"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command gets executed in test-infra as

${CONDA_RUN} ${ENV_SCRIPT} ${{ inputs.build-command }}

where ENV_SCRIPT is our own packaging/vc_env_helper.bat. Setting something like

build-command: "set BUILD_AGAINST_ALL_FFMPEG_FROM_S3=1 && python -m build --wheel -vvv --no-isolation"

doesn't work because, I think, vc_env_helper.bat expects a single command to be passed, not a succession of those. I couldn't find any easy way to make it work, so I gave up. Now the BUILD_AGAINST_ALL_FFMPEG_FROM_S3 is set within vc_env_helper.bat, which isn't great, but it works.


install-and-test:
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,11 @@ def copy_extensions_to_source(self):
# dynamically loaded module. For more, see:
# https://stackoverflow.com/a/2339910
extensions = ["dylib", "so"]
elif sys.platform in ("win32", "cygwin"):
extensions = ["dll"]
else:
raise NotImplementedError(
"Platforms other than linux/darwin are not supported yet"
f"Platform {sys.platform} is not supported"
)

for ext in extensions:
Expand Down