cpp_tests: Switch to only use conda-forge and add back ffmpeg 6 (#658) #2476
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: Lint | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
concurrency: | |
group: unit-test${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -l -eo pipefail {0} | |
jobs: | |
pre-commit-checks: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.12'] | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Setup conda env | |
uses: conda-incubator/setup-miniconda@v2 | |
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 pre-commit | |
run: | | |
python -m pip install pre-commit | |
- name: Run pre-commit checks | |
run: | | |
pre-commit run --all-files | |
- name: Check to see what files pre-commit modified | |
run: | | |
git diff | |
mypy: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.12'] | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Setup conda env | |
uses: conda-incubator/setup-miniconda@v2 | |
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 dependencies and FFmpeg | |
run: | | |
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu | |
conda install "ffmpeg=7.0.1" pkg-config pybind11 -c conda-forge | |
ffmpeg -version | |
- name: Build and install torchcodec | |
run: | | |
python -m pip install -e ".[dev]" --no-build-isolation -vvv | |
- name: Install mypy | |
run: | | |
python -m pip install mypy | |
- name: Run mypy | |
run: | | |
mypy --install-types --non-interactive --config-file mypy.ini |