2025-12-29 nightly release (50686bb306dae586efa53533e43dba0c82aaedf9) #3591
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and test MacOS wheel | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - nightly | |
| - main | |
| - release/* | |
| tags: | |
| - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }} | |
| cancel-in-progress: true | |
| permissions: | |
| id-token: write | |
| contents: write | |
| defaults: | |
| run: | |
| shell: bash -l -eo pipefail {0} | |
| jobs: | |
| generate-matrix: | |
| uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main | |
| with: | |
| package-type: wheel | |
| os: macos-arm64 | |
| test-infra-repository: pytorch/test-infra | |
| test-infra-ref: main | |
| with-xpu: disable | |
| with-rocm: disable | |
| with-cuda: disable | |
| build-python-only: "disable" | |
| build: | |
| needs: generate-matrix | |
| strategy: | |
| fail-fast: false | |
| name: Build and Upload Mac wheel | |
| uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main | |
| with: | |
| repository: meta-pytorch/torchcodec | |
| ref: "" | |
| test-infra-repository: pytorch/test-infra | |
| test-infra-ref: main | |
| build-matrix: ${{ needs.generate-matrix.outputs.matrix }} | |
| pre-script: packaging/pre_build_script.sh | |
| post-script: packaging/post_build_script.sh | |
| smoke-test-script: packaging/fake_smoke_test.py | |
| runner-type: macos-14 | |
| setup-miniconda: true | |
| package-name: torchcodec | |
| 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" | |
| install-and-test: | |
| runs-on: macos-14-xlarge | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10'] | |
| ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1', '8.0'] | |
| needs: build | |
| steps: | |
| - name: Check out torchcodec repo | |
| uses: actions/checkout@v3 | |
| - name: Remove src/ folder | |
| run: bash packaging/remove_src.sh | |
| - name: Setup conda env | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| miniconda-version: "latest" | |
| activate-environment: test | |
| python-version: ${{ matrix.python-version }} | |
| - name: Update pip | |
| run: python -m pip install --upgrade pip | |
| - name: Install PyTorch | |
| run: bash packaging/install_pytorch.sh cpu "torch torchvision" | |
| - name: Download wheel | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: meta-pytorch_torchcodec__${{ matrix.python-version }}_cpu_ | |
| path: dist/ | |
| - name: Install torchcodec from the wheel | |
| run: bash packaging/install_torchcodec_wheel.sh | |
| - name: Install ffmpeg | |
| run: bash packaging/install_ffmpeg.sh ${{ matrix.ffmpeg-version-for-tests }} | |
| - name: Install test dependencies | |
| run: bash packaging/install_test_dependencies.sh | |
| - name: Run Python tests | |
| run: | | |
| pytest --override-ini="addopts=-v" test |