7070 python-version : ${{ matrix.python-version }}
7171 - name : Check out torchcodec repo
7272 uses : actions/checkout@v3
73- - name : Check out tet -infra repo
73+ - name : Check out test -infra repo
7474 uses : actions/checkout@v3
7575 with :
7676 repository : pytorch/test-infra
@@ -82,113 +82,92 @@ jobs:
8282 name : pytorch_torchcodec__${{ matrix.python-version }}_cpu_
8383 path : pytorch/torchcodec/dist/
8484
85- # # start copying from test-infra/.github/actions/setup-binary-builds/action.yaml
86- - name : Clean conda environment
87- shell : bash -l {0}
88- run : |
89- set -euxo pipefail
90- conda info | grep -i 'base environment'
91- conda clean --all --quiet --yes
92- - name : Reset channel priority
93- shell : bash -l {0}
94- run : |
95- set -euxo pipefail
96- conda config --set channel_priority false
97- - name : Discover dir structure
98- shell : bash -l {0}
99- run : |
100- echo "pwd"
101- pwd
102- echo "ls -lh"
103- ls -lh
104- echo "ls -lh pytorch/torchcodec"
105- ls -lh pytorch/torchcodec
106- echo "ls -lh pytorch/torchcodec/dist"
107- ls -lh pytorch/torchcodec/dist
108- wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"`
109- echo "unzip $wheel_path -d unzipped_wheel"
110- unzip $wheel_path -d unzipped_wheel
111- echo "ls -lh unzipped_wheel"
112- ls -lh unzipped_wheel
113- - name : Generate file from pytorch_pkg_helpers
114- # below does not seem necessary in our context
115- # working-directory: "pytorch/torchcodec"
116- shell : bash -l {0}
117- run : |
118- set -euxo pipefail
119- CONDA_ENV="${RUNNER_TEMP}/pytorch_pkg_helpers_${GITHUB_RUN_ID}"
120- conda create \
121- --yes --quiet \
122- --prefix "${CONDA_ENV}" \
123- "python=3.9"
124- CONDA_ENV="${CONDA_ENV}"
125- CONDA_RUN="conda run -p ${CONDA_ENV}"
126- ${CONDA_RUN} python -m pip install ${GITHUB_WORKSPACE}/test-infra/tools/pkg-helpers
127- BUILD_ENV_FILE="${RUNNER_TEMP}/build_env_${GITHUB_RUN_ID}"
128- ${CONDA_RUN} python -m pytorch_pkg_helpers > "${BUILD_ENV_FILE}"
129- cat "${BUILD_ENV_FILE}"
130- echo "BUILD_ENV_FILE=${BUILD_ENV_FILE}" >> "${GITHUB_ENV}"
131- - name : Setup conda environment for build
132- shell : bash -l {0}
133- env :
134- PYTHON_VERSION : ${{ matrix.python-version }}
135- run : |
136- set -euxo pipefail
137- CONDA_ENV="${RUNNER_TEMP}/conda_environment_${GITHUB_RUN_ID}"
138- if [[ "${PACKAGE_TYPE:-}" == "conda" ]]; then
139- # For conda package host python version is irrelevant
140- export PYTHON_VERSION=3.9
141- export CONDA_BUILD_EXTRA="conda=24.4.0 conda-build=24.3.0 python-libarchive-c=2.9"
142- else
143- # For wheel builds we don't need neither conda nor conda-build
144- export CONDA_BUILD_EXTRA=""
145- fi
146-
147- conda create \
148- --yes --quiet \
149- --prefix "${CONDA_ENV}" \
150- "python=${PYTHON_VERSION}" \
151- cmake=3.26 \
152- ninja=1.10 \
153- pkg-config=0.29 \
154- ${CONDA_BUILD_EXTRA} \
155- wheel=0.37
156-
157- echo "CONDA_ENV=${CONDA_ENV}" >> "${GITHUB_ENV}"
158- echo "CONDA_RUN=conda run -p ${CONDA_ENV}" >> "${GITHUB_ENV}"
159- # # end copying
160- - name : Run otool
161- shell : bash -l {0}
162- run : |
163- echo "otool -L unzipped_wheel/torchcodec/libtorchcodec*"
164- otool -L unzipped_wheel/torchcodec/libtorchcodec*
85+ # ## start copying from test-infra/.github/actions/setup-binary-builds/action.yaml
86+ # - name: Clean conda environment
87+ # shell: bash -l {0}
88+ # run: |
89+ # set -euxo pipefail
90+ # conda info | grep -i 'base environment'
91+ # conda clean --all --quiet --yes
92+ # - name: Reset channel priority
93+ # shell: bash -l {0}
94+ # run: |
95+ # set -euxo pipefail
96+ # conda config --set channel_priority false
97+ # - name: Generate file from pytorch_pkg_helpers
98+ # # below does not seem necessary in our context
99+ # #working-directory: "pytorch/torchcodec"
100+ # shell: bash -l {0}
101+ # run: |
102+ # set -euxo pipefail
103+ # CONDA_ENV="${RUNNER_TEMP}/pytorch_pkg_helpers_${GITHUB_RUN_ID}"
104+ # conda create \
105+ # --yes --quiet \
106+ # --prefix "${CONDA_ENV}" \
107+ # "python=3.9"
108+ # CONDA_ENV="${CONDA_ENV}"
109+ # CONDA_RUN="conda run -p ${CONDA_ENV}"
110+ # ${CONDA_RUN} python -m pip install ${GITHUB_WORKSPACE}/test-infra/tools/pkg-helpers
111+ # BUILD_ENV_FILE="${RUNNER_TEMP}/build_env_${GITHUB_RUN_ID}"
112+ # ${CONDA_RUN} python -m pytorch_pkg_helpers > "${BUILD_ENV_FILE}"
113+ # cat "${BUILD_ENV_FILE}"
114+ # echo "BUILD_ENV_FILE=${BUILD_ENV_FILE}" >> "${GITHUB_ENV}"
115+ # - name: Setup conda environment for build
116+ # shell: bash -l {0}
117+ # env:
118+ # PYTHON_VERSION: ${{ matrix.python-version }}
119+ # run: |
120+ # set -euxo pipefail
121+ # CONDA_ENV="${RUNNER_TEMP}/conda_environment_${GITHUB_RUN_ID}"
122+ # if [[ "${PACKAGE_TYPE:-}" == "conda" ]]; then
123+ # # For conda package host python version is irrelevant
124+ # export PYTHON_VERSION=3.9
125+ # export CONDA_BUILD_EXTRA="conda=24.4.0 conda-build=24.3.0 python-libarchive-c=2.9"
126+ # else
127+ # # For wheel builds we don't need neither conda nor conda-build
128+ # export CONDA_BUILD_EXTRA=""
129+ # fi
130+ #
131+ # conda create \
132+ # --yes --quiet \
133+ # --prefix "${CONDA_ENV}" \
134+ # "python=${PYTHON_VERSION}" \
135+ # cmake=3.26 \
136+ # ninja=1.10 \
137+ # pkg-config=0.29 \
138+ # ${CONDA_BUILD_EXTRA} \
139+ # wheel=0.37
140+ #
141+ # echo "CONDA_ENV=${CONDA_ENV}" >> "${GITHUB_ENV}"
142+ # echo "CONDA_RUN=conda run -p ${CONDA_ENV}" >> "${GITHUB_ENV}"
143+ # ## end copying
165144
166145 - name : Update pip
167146 run : python -m pip install --upgrade pip
168147 - name : Install ffmpeg
169148 run : |
170- ${CONDA_RUN} conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
171- ${CONDA_RUN} ffmpeg -version
149+ conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
150+ ffmpeg -version
172151 - name : Install PyTorch
173152 run : |
174- ${CONDA_RUN} python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
153+ python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
175154 - name : Install torchcodec from the wheel
176155 run : |
177156 wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"`
178157 echo Installing $wheel_path
179- ${CONDA_RUN} python -m pip install $wheel_path -vvv
158+ python -m pip install $wheel_path -vvv
180159 - name : Install test dependencies
181160 run : |
182- ${CONDA_RUN} python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
183- ${CONDA_RUN} python -m pip install numpy pytest pillow
161+ python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
162+ python -m pip install numpy pytest pillow
184163 - name : Delete the src/ folder just for fun
185164 run : |
186165 rm -r src/
187166 ls
188167 - name : Smoke test
189168 run : |
190- ${CONDA_RUN} python -X faulthandler test/decoders/manual_smoke_test.py
169+ python -X faulthandler test/decoders/manual_smoke_test.py
191170 ls -lh
192171 - name : Run Python tests
193172 run : |
194- ${CONDA_RUN} pytest test
173+ pytest test
0 commit comments