-
Notifications
You must be signed in to change notification settings - Fork 64
Adding Mac to S3 non-GPL FFmpeg compile #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Build and test MacOS | ||
|
||
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: | | ||
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
- name: Install compile from source dependencies | ||
run: | | ||
conda install cmake pkg-config -c conda-forge | ||
- 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 torchcodec from source, building against non-GPL FFmpeg | ||
run: | | ||
BUILD_AGAINST_ALL_FFMPEG_FROM_S3=1 pip install -e ".[dev]" --no-build-isolation | ||
- 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. | ||
source packaging/helpers.sh | ||
assert_ffmpeg_not_installed | ||
|
||
conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge | ||
ffmpeg -version | ||
- name: Smoke test | ||
run: | | ||
python test/decoders/manual_smoke_test.py | ||
- name: Run Python tests | ||
run: | | ||
pytest test -vvv |
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.