Fix FFmpeg build and clean up unneeded libraries.

This commit is contained in:
Steveice10 2023-05-18 02:48:23 -07:00
parent ac339b413e
commit 890902d6ab
13 changed files with 13 additions and 210 deletions

View File

@ -10,63 +10,12 @@ on:
branches: [ main ]
env:
SDL_VER: "2.26.1"
FFMPEG_VER: "6.0"
QT_VER: "5.15.8"
MVK_VER: "1.2.1"
jobs:
SDL:
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"
CCACHE_CPP2: "yes"
CCACHE_SLOPPINESS: "time_macros"
CC: "ccache clang"
CXX: "ccache clang++"
OBJC: "clang"
runs-on: macos-latest
steps:
- name: Checkout
run: |
git clone -b release-${SDL_VER} https://github.com/libsdl-org/SDL.git --depth 1
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/Library/Caches/ccache
key: ${{ runner.os }}-macos-${{ github.sha }}
restore-keys: |
${{ runner.os }}-macos-
- name: Install dependencies
run: |
brew install p7zip ccache nasm
- name: Build SDL
run: |
export PATH="/usr/local/opt/ccache/libexec:$PATH"
mkdir -p SDL/build/sdl-${SDL_VER}
cd SDL/build
cmake ../ -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DBUILD_SHARED_LIBS=1
make -j4
make install DESTDIR=$(pwd)/sdl-${SDL_VER}
7z a "sdl-${SDL_VER}.7z" sdl-${SDL_VER}/
- name: Pack
run: |
# move the compiled archive into the artifacts directory to be uploaded
mkdir -p artifacts/sdl2
mv "SDL/build/sdl-${SDL_VER}.7z" artifacts/sdl2
- name: Upload
uses: actions/upload-artifact@v2
with:
name: macos
path: |
artifacts/
FFmpeg:
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"
MACOSX_DEPLOYMENT_TARGET: "11.0"
CCACHE_CPP2: "yes"
CCACHE_SLOPPINESS: "time_macros"
CC: "ccache clang"
@ -78,7 +27,7 @@ jobs:
run: |
git clone -b n${FFMPEG_VER} https://git.ffmpeg.org/ffmpeg.git --depth 1
- name: Set up cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/Library/Caches/ccache
@ -114,7 +63,7 @@ jobs:
# The included lzma is built for 10.15 can generates linker warnings
../../configure --enable-cross-compile --arch=arm64 \
--cc="${CC} -arch arm64" --cxx="${CXX} -arch arm64" --enable-shared --disable-static --disable-doc \
--disable-lzma
--disable-lzma --disable-xlib
make -j4
make install DESTDIR=$armpath/install
- name: Create universal build
@ -127,17 +76,17 @@ jobs:
# Fix dylibs to be path-independent.
for dylib in $(find $(pwd) -name '*.dylib'); do
change_id=1
# Fix ID.
id_path=$(otool -D $dylib | sed -n '2 p')
fixed_id_path="@rpath/"`basename $id_path`
install_name_tool -id $fixed_id_path $dylib
# Fix dependency paths.
for path in $(otool -L $dylib | grep \t | cut -d' ' -f1 | xargs); do
if [[ $path = /usr/local/lib* ]]; then
fixed_path="@rpath/"`basename $path`
if [ $change_id -eq 1 ]; then
change_id=0
install_name_tool -id $fixed_path $dylib
else
install_name_tool -change $path $fixed_path $dylib
fi
fi
done
done
@ -163,126 +112,16 @@ jobs:
mkdir -p artifacts/ffmpeg
mv "ffmpeg/build/ffmpeg-${FFMPEG_VER}.7z" artifacts/ffmpeg
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: macos
path: |
artifacts/
Qt:
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"
CCACHE_CPP2: "yes"
CCACHE_SLOPPINESS: "time_macros"
CC: "ccache clang"
CXX: "ccache clang++"
OBJC: "clang"
runs-on: macos-latest
steps:
- name: Checkout
run: |
wget https://download.qt.io/official_releases/qt/${QT_VER%.*}/${QT_VER}/single/qt-everywhere-opensource-src-${QT_VER}.tar.xz
tar xf qt-everywhere-opensource-src-${QT_VER}.tar.xz
mv qt-everywhere-src-${QT_VER} qt
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/Library/Caches/ccache
key: ${{ runner.os }}-macos-${{ github.sha }}
restore-keys: |
${{ runner.os }}-macos-
- name: Install dependencies
run: |
brew install p7zip ccache
- name: Build Qt
run: |
export PATH="/usr/local/opt/ccache/libexec:$PATH"
mkdir -p qt/build/qt-${QT_VER}
cd qt/build
../configure -prefix $(pwd)/qt-${QT_VER} -device-option QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" \
-debug-and-release -opensource -opengl desktop -mp -ltcg \
-nomake examples -nomake tests \
-skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d \
-skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtlocation -skip qtlottie -skip qtmacextras \
-skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquicktimeline \
-skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport \
-skip qtspeech -skip qtsvg -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview \
-skip qtx11extras -skip qtxmlpatterns -skip qtvirtualkeyboard -skip qtquickcontrols2 -skip qtdeclarative \
-skip qtnetworkauth -skip qtwinextras -skip qtimageformats
make -j4
make install
7z a "qt-${QT_VER}.7z" qt-${QT_VER}/
- name: Pack
run: |
# move the compiled archive into the artifacts directory to be uploaded
mkdir -p artifacts/qt
mv "qt/build/qt-${QT_VER}.7z" artifacts/qt
- name: Upload
uses: actions/upload-artifact@v2
with:
name: macos
path: |
artifacts/
MoltenVK:
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"
CCACHE_CPP2: "yes"
CCACHE_SLOPPINESS: "time_macros"
CC: "clang"
CXX: "clang++"
OBJC: "clang"
runs-on: macos-latest
steps:
- name: Checkout
run: |
git clone -b v${MVK_VER} https://github.com/KhronosGroup/MoltenVK.git --depth 1
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/Library/Caches/ccache
External/build
!External/build/Intermediates
key: ${{ runner.os }}-macos-${{ github.sha }}
restore-keys: |
${{ runner.os }}-macos-
- name: Install dependencies
run: |
brew install p7zip ccache
cd MoltenVK
./fetchDependencies -v --macos
- name: Build MoltenVK
run: |
export PATH="/usr/local/opt/ccache/libexec:$PATH"
cd MoltenVK
make macos -j4
# Workaround unsupported `make install` to custom prefix
mkdir -p moltenvk-${MVK_VER}/Library/Frameworks/
cp -a Package/Latest/MoltenVK/MoltenVK.xcframework moltenvk-${MVK_VER}/Library/Frameworks/
7z a "moltenvk-${MVK_VER}.7z" moltenvk-${MVK_VER}/
- name: Pack
run: |
# move the compiled archive into the artifacts directory to be uploaded
mkdir -p artifacts/moltenvk
mv "MoltenVK/moltenvk-${MVK_VER}.7z" artifacts/moltenvk
- name: Upload
uses: actions/upload-artifact@v2
with:
name: macos
path: |
artifacts/
PR:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: [SDL, FFmpeg, Qt, MoltenVK]
needs: [FFmpeg]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
@ -297,13 +136,7 @@ jobs:
title: '[Auto] The bump by Github Actions'
commit-message: |
[Auto] Bumps
- SDL2 ${{ env.SDL_VER }}
- FFmpeg ${{ env.FFMPEG_VER }}
- Qt ${{ env.QT_VER }}
- MoltenVK ${{ env.MVK_VER }}
body: |
Bumps
- SDL2 ${{ env.SDL_VER }}
- FFmpeg ${{ env.FFMPEG_VER }}
- Qt ${{ env.QT_VER }}
- MoltenVK ${{ env.MVK_VER }}

View File

@ -1,2 +1,2 @@
# ext-macos-bin
macOs binaries for dependencies / libraries used by Citra, built with 10.13 compatibility
macOs binaries for dependencies / libraries used by Citra, built with 11.0 compatibility

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f445a40effdfe423bbae62bf2e97d7c9ebd7692e7c8b548de7ce9dd5c056906d
size 7158355

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e49f37fabb5b8f8dbde32f571e358f4a6bed4111d395781538ff5cf75a952da3
size 7865791

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:654cc203de2fc2bc06d8115a168581478578cbbe6f6210f842468103ab1c6286
size 7655602

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:22c39c62b27933d504b5d4c0b9f5a5c82318b41872cb2bb613ac029bdf8d67b3
size 12895421

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:014dbfc3d6c95c1a4878a7b90e251af2fb1a011078ea0c1b0a1572c4dfb1e9ac
size 2971637

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0796abced5e14dc532b7ef36f50af219434b34828f3fbac374a5de78f0115b8d
size 67503812

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bff715370d810a1b68bb933433b8fe1b55a84f6be824d38eded5ffb839c02919
size 698738

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:47dfc0b65174def5f967b5a9a0a2ee77bbc92079a72950b7a7d5910e0efaa652
size 737635

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:05b60fdec003729c94be74c4833b6e74cca1151731f15fa0760aee9fdc9b9f1c
size 747553

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0588e167c4e9717f7a5c732fa82d062da13a42332e585a2a35287f62d84b8524
size 1231833