Skip to content

Commit

Permalink
Add Mac to FFmpeg build CI
Browse files Browse the repository at this point in the history
  • Loading branch information
scotts committed Sep 5, 2024
1 parent bfc5ba2 commit 7337455
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions .github/workflows/build_ffmpeg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
# par new major release of FFmepg.
name: Build non-GPL FFmpeg from source

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # on sunday
#on:
# workflow_dispatch:
# schedule:
# - cron: '0 0 * * 0' # on sunday
#
on: # temp for testing; tell Scott to remove this if under review
push:
branches: [ main ]
pull_request:

defaults:
run:
Expand Down Expand Up @@ -43,3 +48,26 @@ jobs:
with:
name: "ffmpeg_${{ matrix.ffmpeg-version }}_linux_x86_64"
path: artifact_dir
LGPL-macOS:
strategy:
fail-fast: false
matrix:
ffmpeg_version: ["4.4.4", "5.1.4", "6.1.1", "master"]
runner: ["macos-m1-stable", "macos-12"]
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
with:
job-name: Build
upload-artifact: ffmpeg-lgpl
repository: pytorch/torchcodec
runner: "${{ matrix.runner }}"
script: |
export FFMPEG_VERSION="${{ matrix.ffmpeg_version }}"
export FFMPEG_ROOT="${PWD}/ffmpeg"
packaging/build_ffmpeg.sh
tar -czf ffmpeg.tar.gz ffmpeg/include ffmpeg/lib
artifact_dir="${RUNNER_ARTIFACT_DIR}/$(date +%Y-%m-%d)/macos_$(uname -m)"
mkdir -p "${artifact_dir}"
mv ffmpeg.tar.gz "${artifact_dir}/${FFMPEG_VERSION}.tar.gz"

0 comments on commit 7337455

Please sign in to comment.