Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Aug 7, 2024
1 parent 6782c0a commit 794104a
Showing 1 changed file with 75 additions and 75 deletions.
150 changes: 75 additions & 75 deletions .github/workflows/wheel2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,35 @@ defaults:


jobs:
# generate-matrix:
# uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
# with:
# package-type: wheel
# os: linux
# test-infra-repository: pytorch/test-infra
# test-infra-ref: main
# with-xpu: disable
# with-rocm: disable
# with-cuda: disable
# build:
# needs: generate-matrix
# strategy:
# fail-fast: false
# name: Build and Upload wheel
# uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
# with:
# repository: pytorch/torchcodec
# ref: ""
# test-infra-repository: pytorch/test-infra
# test-infra-ref: main
# build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
# post-script: packaging/post_build_script.sh
# env-var-script: packaging/env_var_script.sh
# smoke-test-script: packaging/fake_smoke_test.py
# package-name: torchcodec
# trigger-event: ${{ github.event_name }}
# build-platform: "python-build-package"
# wheel-build-extra-args: "--no-isolation"
generate-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
os: linux
test-infra-repository: pytorch/test-infra
test-infra-ref: main
with-xpu: disable
with-rocm: disable
with-cuda: disable
build:
needs: generate-matrix
strategy:
fail-fast: false
name: Build and Upload wheel
uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
with:
repository: pytorch/torchcodec
ref: ""
test-infra-repository: pytorch/test-infra
test-infra-ref: main
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
post-script: packaging/post_build_script.sh
env-var-script: packaging/env_var_script.sh
smoke-test-script: packaging/fake_smoke_test.py
package-name: torchcodec
trigger-event: ${{ github.event_name }}
build-platform: "python-build-package"
wheel-build-extra-args: "--no-isolation"

install-and-test:
runs-on: ubuntu-latest
Expand All @@ -64,12 +64,12 @@ jobs:
python-version: ['3.9']
ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
if: ${{ always() }}
# needs: build
needs: build
steps:
# - uses: actions/download-artifact@v3
# with:
# name: pytorch_torchcodec__${{ matrix.python-version }}_cpu_x86_64
# path: pytorch/torchcodec/dist/
- uses: actions/download-artifact@v3
with:
name: pytorch_torchcodec__${{ matrix.python-version }}_cpu_x86_64
path: pytorch/torchcodec/dist/
- name: Setup conda env
uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -85,48 +85,48 @@ jobs:
- name: Install PyTorch
run: |
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
# - name: Install torchcodec from the wheel
# run: |
# wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"`
# echo Installing $wheel_path
# python -m pip install $wheel_path -vvv
- name: Install torchcodec from the wheel
run: |
wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"`
echo Installing $wheel_path
python -m pip install $wheel_path -vvv
# - name: Check out repo
# uses: actions/checkout@v3
# - name: Install ffmpeg, post build
# run: |
# # Ideally we would have checked for that before installing the wheel,
# # but we need to checkout the repo to access this file, and we don't
# # want to checkout the repo before installing the wheel to avoid any
# # side-effect. It's OK.
# .github/scripts/assert_ffmpeg_not_installed.sh
- name: Check out repo
uses: actions/checkout@v3
- name: Install ffmpeg, post build
run: |
# Ideally we would have checked for that before installing the wheel,
# but we need to checkout the repo to access this file, and we don't
# want to checkout the repo before installing the wheel to avoid any
# side-effect. It's OK.
.github/scripts/assert_ffmpeg_not_installed.sh
# conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
# ffmpeg -version
conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
ffmpeg -version
# - name: Install test dependencies
# run: |
# python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
# # Ideally we would find a way to get those dependencies from pyproject.toml
# python -m pip install numpy pytest pillow
- name: Install test dependencies
run: |
python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
# Ideally we would find a way to get those dependencies from pyproject.toml
python -m pip install numpy pytest pillow
# - name: Delete the src/ folder just for fun
# run: |
# # The only reason we checked-out the repo is to get access to the
# # tests. We don't care about the rest. Out of precaution, we delete
# # the src/ folder to be extra sure that we're running the code from
# # the installed wheel rather than from the source.
# # This is just to be extra cautious and very overkill because a)
# # there's no way the `torchcodec` package from src/ can be found from
# # the PythonPath: the main point of `src/` is precisely to protect
# # against that and b) if we ever were to execute code from
# # `src/torchcodec`, it would fail loudly because the built .so files
# # aren't present there.
# rm -r src/
# ls
# - name: Smoke test
# run: |
# python test/decoders/manual_smoke_test.py
# - name: Run Python tests
# run: |
# pytest test
- name: Delete the src/ folder just for fun
run: |
# The only reason we checked-out the repo is to get access to the
# tests. We don't care about the rest. Out of precaution, we delete
# the src/ folder to be extra sure that we're running the code from
# the installed wheel rather than from the source.
# This is just to be extra cautious and very overkill because a)
# there's no way the `torchcodec` package from src/ can be found from
# the PythonPath: the main point of `src/` is precisely to protect
# against that and b) if we ever were to execute code from
# `src/torchcodec`, it would fail loudly because the built .so files
# aren't present there.
rm -r src/
ls
- name: Smoke test
run: |
python test/decoders/manual_smoke_test.py
- name: Run Python tests
run: |
pytest test

0 comments on commit 794104a

Please sign in to comment.