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 10ff851
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
81 changes: 81 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ jobs:


VS2022:
if: false
runs-on: windows-2022
env:
TARGET_OS: ${{ matrix.target }}
Expand Down Expand Up @@ -215,6 +216,7 @@ jobs:


VS2022LTL:
if: false
runs-on: windows-2022
env:
TARGET_OS: ${{ matrix.target }}
Expand Down Expand Up @@ -344,6 +346,7 @@ jobs:


Windows_clang:
if: false
runs-on: ubuntu-latest
env:
TARGET_OS: ${{ matrix.target }}
Expand Down Expand Up @@ -395,6 +398,7 @@ jobs:


VCRT120_clang:
if: false
runs-on: ubuntu-latest
env:
TARGET_OS: windows-desktop
Expand Down Expand Up @@ -444,6 +448,7 @@ jobs:


MinGW_GCC:
if: false
runs-on: ubuntu-latest
env:
TARGET_OS: mingw
Expand Down Expand Up @@ -479,6 +484,7 @@ jobs:
path: ffmpeg-*.tar.xz

Linux_clang:
if: false
runs-on: ubuntu-latest
env:
TARGET_OS: linux
Expand Down Expand Up @@ -524,6 +530,7 @@ jobs:
path: ffmpeg-*.tar.xz

Android:
if: false
runs-on: macos-latest
env:
TARGET_OS: android
Expand Down Expand Up @@ -571,6 +578,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/xcframework/
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 10ff851

Please sign in to comment.