Skip to content

Commit

Permalink
ci: upload FFmpeg.xcframework
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Sep 28, 2024
1 parent 7a1f653 commit 828c60d
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
74 changes: 74 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,80 @@ jobs:
name: ffmpeg-${{ env.FF_VERSION }}-${{ env.TARGET_OS }}-${{ matrix.config }}
path: ffmpeg-*.tar.xz

FFmpeg-xcframework:
runs-on: macos-latest
needs: Apple
steps:
- name: Download iOS
uses: actions/download-artifact@v4
with:
name: ffmpeg-${{ env.FF_VERSION }}-iOS-lite-lto
- name: Download iOSSimulator
uses: actions/download-artifact@v4
with:
name: ffmpeg-${{ env.FF_VERSION }}-iOSSimulator-lite-lto
- name: Download tvOS
uses: actions/download-artifact@v4
with:
name: ffmpeg-${{ env.FF_VERSION }}-tvOS-lite-lto
- name: Download tvOSSimulator
uses: actions/download-artifact@v4
with:
name: ffmpeg-${{ env.FF_VERSION }}-tvOSSimulator-lite-lto
- name: Download visionOS
uses: actions/download-artifact@v4
with:
name: ffmpeg-${{ env.FF_VERSION }}-visionOS-lite-lto
- name: Download visionOSSimulator
uses: actions/download-artifact@v4
with:
name: ffmpeg-${{ env.FF_VERSION }}-visionOSSimulator-lite-lto
- name: Download macOS
uses: actions/download-artifact@v4
with:
name: ffmpeg-${{ env.FF_VERSION }}-macOS-lite-lto
- name: Download macCatalyst
uses: actions/download-artifact@v4
with:
name: ffmpeg-${{ env.FF_VERSION }}-macCatalyst-lite-lto
- name: Gen FFmpeg.framework
run: |
for OS in iOS iOSSimulator tvOS tvOSSimulator visionOS visionOSSimulator; do
tar xf ffmpeg-${{ env.FF_VERSION }}-${OS}-lite-lto-shared.tar.xz
cd ffmpeg-${{ env.FF_VERSION }}-${OS}-lite-lto
./dylib2framework.sh lib/libffmpeg.dylib
cd -
done
for OS in macOS macCatalyst; do
tar xf ffmpeg-${{ env.FF_VERSION }}-${OS}-lite-lto.tar.xz
cd ffmpeg-${{ env.FF_VERSION }}-${OS}-lite-lto
./dylib2framework.sh lib/libffmpeg.dylib
cd -
done
- name: Gen FFmpeg.xcframework
env:
export XZ_OPT: "-T0 -9e" # -9e. -8/9 will disable mt?
run: |
for OS in macOS macCatalyst iOS iOSSimulator tvOS tvOSSimulator visionOS visionOSSimulator; do
ARGS+=" -framework ffmpeg-${{ env.FF_VERSION }}-${OS}-lite-lto/lib/FFmpeg.framework"
done
xcodebuild -create-xcframework $ARGS -output FFmpeg.xcframework
codesign --force --sign - --deep --timestamp FFmpeg.xcframework
cp -af ffmpeg-${{ env.FF_VERSION }}-iOS-lite-lto/include .
gtar Jcvf FFmpeg.xcframework-${{ env.FF_VERSION }}.tar.xz FFmpeg.xcframework include
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: FFmpeg.xcframework-${{ env.FF_VERSION }}
path: FFmpeg.xcframework-${{ env.FF_VERSION }}.tar.xz
- name: Upload to SourceForge
if: (github.event_name != 'pull_request')
shell: bash
run: |
brew install hudochenkov/sshpass/sshpass
sshpass -p $SF_PW_MAPPED scp -o StrictHostKeyChecking=no FFmpeg.xcframework-${{ env.FF_VERSION }}.tar.xz $SF_USER_MAPPED,avbuild@frs.sourceforge.net:/home/frs/project/a/av/avbuild/
Upload:
runs-on: ubuntu-latest
needs: [VS2022]
Expand Down
2 changes: 1 addition & 1 deletion avbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ make_universal()
rm -rf $OUT_DIR
cd $THIS_DIR
mkdir -p $OUT_DIR/{bin,lib}
cp -avf tools/dylib2framework.sh $OUT_DIR
cp -avf tools/{dylib2framework.sh,PrivacyInfo.xcprivacy} $OUT_DIR
cp -af ${dirs[0]}/include $OUT_DIR
for a in libavutil libavformat libavcodec libavfilter libavdevice libswscale libswresample libffmpeg; do
libs=
Expand Down

0 comments on commit 828c60d

Please sign in to comment.