Skip to content

Adding Mac to S3 non-GPL FFmpeg compile #26

Adding Mac to S3 non-GPL FFmpeg compile

Adding Mac to S3 non-GPL FFmpeg compile #26

name: MacOS From Source
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:
install-and-test:
runs-on: macos-m1-stable
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
if: ${{ always() }}
steps:
- 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: |
conda install pytorch::pytorch torchvision torchaudio -c pytorch
- name: Install compile from source dependencies
run: |
conda install cmake pkg-config "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
- name: Check out repo
uses: actions/checkout@v3
- name: Install torchcodec from source
run: |
pip install -e ".[dev]" --no-build-isolation -vv
- name: Install test dependencies
run: |
conda install numpy pytest pillow
- name: Smoke test
run: |
python test/decoders/manual_smoke_test.py
- name: Run Python tests
continue-on-error: true
run: |
pytest test --capture=fd -k "test_throws_exception_at_eof" -vvv
- name: Print debug text
run: |
echo "pwd"
pwd
echo ""
echo "ls -lh"
ls -lh
echo ""
echo "cat debug.txt"
cat debug.txt