@@ -14,14 +14,51 @@ defaults:
1414 shell : bash -l -eo pipefail {0}
1515
1616jobs :
17+ generate-matrix :
18+ uses : pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
19+ with :
20+ package-type : wheel
21+ os : linux
22+ test-infra-repository : pytorch/test-infra
23+ test-infra-ref : main
24+ with-xpu : disable
25+ with-rocm : disable
26+ with-cuda : disable
27+ build-python-only : " disable"
28+
29+ build :
30+ needs : generate-matrix
31+ strategy :
32+ fail-fast : false
33+ name : Build and Upload Linux wheel
34+ uses : pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
35+ with :
36+ repository : meta-pytorch/torchcodec
37+ ref : " "
38+ test-infra-repository : pytorch/test-infra
39+ test-infra-ref : main
40+ build-matrix : ${{ needs.generate-matrix.outputs.matrix }}
41+ pre-script : packaging/pre_build_script.sh
42+ post-script : packaging/post_build_script.sh
43+ smoke-test-script : packaging/fake_smoke_test.py
44+ package-name : torchcodec
45+ trigger-event : ${{ github.event_name }}
46+ build-platform : " python-build-package"
47+ build-command : " BUILD_AGAINST_ALL_FFMPEG_FROM_S3=1 python -m build --wheel -vvv --no-isolation"
48+
1749 test-reference-resource-generation :
50+ needs : build
1851 runs-on : ubuntu-latest
1952 strategy :
2053 fail-fast : false
2154 matrix :
2255 python-version : ['3.10']
2356 ffmpeg-version-for-tests : ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
2457 steps :
58+ - uses : actions/download-artifact@v4
59+ with :
60+ name : meta-pytorch_torchcodec__${{ matrix.python-version }}_cpu_x86_64
61+ path : pytorch/torchcodec/dist/
2562 - name : Setup conda env
2663 uses : conda-incubator/setup-miniconda@v2
2764 with :
@@ -43,11 +80,16 @@ jobs:
4380 # Note that we're installing stable - this is for running a script where we're a normal PyTorch
4481 # user, not for building TorhCodec.
4582 python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
46- python -m pip install numpy pillow
83+ python -m pip install numpy pillow pytest
4784
85+ - name : Install torchcodec from the wheel
86+ run : |
87+ wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"`
88+ echo Installing $wheel_path
89+ python -m pip install $wheel_path -vvv
4890 - name : Check out repo
4991 uses : actions/checkout@v3
5092
5193 - name : Run generation reference resources
5294 run : |
53- python test/generate_reference_resources.py
95+ python -m test.generate_reference_resources
0 commit comments