Skip to content

Commit 195ac60

Browse files
committed
Merge branch 'mac_wheels_ci' of github.com:scotts/torchcodec into mac_wheels_ci
2 parents 2733862 + 4a8eb56 commit 195ac60

File tree

1 file changed

+73
-72
lines changed

1 file changed

+73
-72
lines changed

.github/workflows/macos_wheel.yaml

Lines changed: 73 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
build-command: "BUILD_AGAINST_ALL_FFMPEG_FROM_S3=1 ${CONDA_RUN} python3 -m build --wheel -vvv --no-isolation"
5656

5757
validate-binaries:
58+
needs: build
5859
uses: pytorch/test-infra/.github/workflows/validate-domain-library.yml@main
5960
with:
6061
package_type: "wheel"
@@ -64,75 +65,75 @@ jobs:
6465
smoke_test: "source ./packaging/validate_wheel.sh"
6566
install_torch: true
6667

67-
install-and-test:
68-
runs-on: macos-m1-stable
69-
strategy:
70-
fail-fast: false
71-
matrix:
72-
python-version: ['3.9']
73-
ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
74-
if: ${{ always() }}
75-
needs: build
76-
steps:
77-
- uses: actions/download-artifact@v3
78-
with:
79-
name: pytorch_torchcodec__${{ matrix.python-version }}_cpu_
80-
path: pytorch/torchcodec/dist/
81-
- name: Setup miniconda
82-
uses: pytorch/test-infra/.github/actions/setup-miniconda@macbuildwheel
83-
with:
84-
python-version: ${{ matrix.python-version }}
85-
- name: Update pip
86-
run: |
87-
python3 -m pip install --upgrade pip
88-
- name: Install PyTorch
89-
run: |
90-
python3 -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
91-
- name: Install torchcodec from the wheel
92-
run: |
93-
wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"`
94-
echo Installing $wheel_path
95-
python3 -m pip install $wheel_path -vvv
96-
97-
- name: Check out repo
98-
uses: actions/checkout@v3
99-
- name: Install ffmpeg, post build
100-
run: |
101-
# Ideally we would have checked for that before installing the wheel,
102-
# but we need to checkout the repo to access this file, and we don't
103-
# want to checkout the repo before installing the wheel to avoid any
104-
# side-effect. It's OK.
105-
source packaging/helpers.sh
106-
107-
# below was failing, but when I just try to call "ffmpeg -version" that also fails?
108-
#assert_ffmpeg_not_installed
109-
110-
conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
111-
ffmpeg -version
112-
113-
- name: Install test dependencies
114-
run: |
115-
python3 -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
116-
# Ideally we would find a way to get those dependencies from pyproject.toml
117-
python3 -m pip install numpy pytest pillow
118-
119-
- name: Delete the src/ folder just for fun
120-
run: |
121-
# The only reason we checked-out the repo is to get access to the
122-
# tests. We don't care about the rest. Out of precaution, we delete
123-
# the src/ folder to be extra sure that we're running the code from
124-
# the installed wheel rather than from the source.
125-
# This is just to be extra cautious and very overkill because a)
126-
# there's no way the `torchcodec` package from src/ can be found from
127-
# the PythonPath: the main point of `src/` is precisely to protect
128-
# against that and b) if we ever were to execute code from
129-
# `src/torchcodec`, it would fail loudly because the built .so files
130-
# aren't present there.
131-
rm -r src/
132-
ls
133-
- name: Smoke test
134-
run: |
135-
python3 test/decoders/manual_smoke_test.py
136-
- name: Run Python tests
137-
run: |
138-
pytest test
68+
# install-and-test:
69+
# runs-on: macos-m1-stable
70+
# strategy:
71+
# fail-fast: false
72+
# matrix:
73+
# python-version: ['3.9']
74+
# ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
75+
# if: ${{ always() }}
76+
# needs: build
77+
# steps:
78+
# - uses: actions/download-artifact@v3
79+
# with:
80+
# name: pytorch_torchcodec__${{ matrix.python-version }}_cpu_
81+
# path: pytorch/torchcodec/dist/
82+
# - name: Setup miniconda
83+
# uses: pytorch/test-infra/.github/actions/setup-miniconda@macbuildwheel
84+
# with:
85+
# python-version: ${{ matrix.python-version }}
86+
# - name: Update pip
87+
# run: |
88+
# python3 -m pip install --upgrade pip
89+
# - name: Install PyTorch
90+
# run: |
91+
# python3 -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
92+
# - name: Install torchcodec from the wheel
93+
# run: |
94+
# wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"`
95+
# echo Installing $wheel_path
96+
# python3 -m pip install $wheel_path -vvv
97+
#
98+
# - name: Check out repo
99+
# uses: actions/checkout@v3
100+
# - name: Install ffmpeg, post build
101+
# run: |
102+
# # Ideally we would have checked for that before installing the wheel,
103+
# # but we need to checkout the repo to access this file, and we don't
104+
# # want to checkout the repo before installing the wheel to avoid any
105+
# # side-effect. It's OK.
106+
# source packaging/helpers.sh
107+
#
108+
# # below was failing, but when I just try to call "ffmpeg -version" that also fails?
109+
# #assert_ffmpeg_not_installed
110+
#
111+
# conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
112+
# ffmpeg -version
113+
#
114+
# - name: Install test dependencies
115+
# run: |
116+
# python3 -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
117+
# # Ideally we would find a way to get those dependencies from pyproject.toml
118+
# python3 -m pip install numpy pytest pillow
119+
#
120+
# - name: Delete the src/ folder just for fun
121+
# run: |
122+
# # The only reason we checked-out the repo is to get access to the
123+
# # tests. We don't care about the rest. Out of precaution, we delete
124+
# # the src/ folder to be extra sure that we're running the code from
125+
# # the installed wheel rather than from the source.
126+
# # This is just to be extra cautious and very overkill because a)
127+
# # there's no way the `torchcodec` package from src/ can be found from
128+
# # the PythonPath: the main point of `src/` is precisely to protect
129+
# # against that and b) if we ever were to execute code from
130+
# # `src/torchcodec`, it would fail loudly because the built .so files
131+
# # aren't present there.
132+
# rm -r src/
133+
# ls
134+
# - name: Smoke test
135+
# run: |
136+
# python3 test/decoders/manual_smoke_test.py
137+
# - name: Run Python tests
138+
# run: |
139+
# pytest test -vvv

0 commit comments

Comments
 (0)