Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nastys committed Jan 16, 2023
1 parent 75d3d85 commit 60a9963
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 55 deletions.
71 changes: 25 additions & 46 deletions .ci/build-mac.sh
Original file line number Diff line number Diff line change
@@ -1,54 +1,31 @@
#!/bin/sh -ex

export NONINTERACTIVE=1

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
brew install -f --overwrite llvm@14 nasm ninja git p7zip create-dmg ccache

#/usr/sbin/softwareupdate --install-rosetta --agree-to-license
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/homebrew/bin/brew install llvm@14 sdl2 glew cmake nasm ninja p7zip create-dmg ccache qt@5
#arch -x86_64 /usr/local/homebrew/bin/brew install --build-from-source qt@5
arch -x86_64 /usr/local/homebrew/bin/brew install -f --overwrite llvm@14 sdl2 qt@5 glew cmake

export MACOSX_DEPLOYMENT_TARGET=12.0
#export MACOSX_DEPLOYMENT_TARGET=12.0
export CXX=clang++
export CC=clang
export Qt5_DIR="/usr/local/opt/qt@5/lib/cmake/Qt5"
export PATH="/usr/local/opt/llvm@14/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin"
#export LDFLAGS="-L/usr/local/opt/llvm@14/lib -Wl,-rpath,/usr/local/opt/llvm@14/lib"
#export CPPFLAGS="-I/usr/local/opt/llvm@14/include -msse -msse2 -mcx16 -no-pie"
export LDFLAGS="-L/usr/local/Homebrew/lib -Wl,-rpath,/usr/local/Homebrew/lib"
export CPPFLAGS="-I/usr/local/Homebrew/include -msse -msse2 -mcx16 -no-pie"
export LIBRARY_PATH=/usr/local/Homebrew/lib
export LD_LIBRARY_PATH=/usr/local/Homebrew/lib

brew unlink llvm@14
brew link llvm@14

brew unlink sdl2
brew link sdl2

brew unlink qt@5
brew link qt@5

brew unlink glew
brew link glew

brew unlink cmake
brew link cmake

brew unlink nasm
brew link nasm

brew unlink ninja
brew link ninja

brew unlink p7zip
brew link p7zip
export BREW_PATH;
BREW_PATH="$(brew --prefix)/opt"
export BREW_X64_PATH;
BREW_X64_PATH="$("/usr/local/homebrew/bin/brew" --prefix)/opt"
export BREW_BIN="/usr/local/bin"
export BREW_SBIN="/usr/local/sbin"
export CMAKE_EXTRA_OPTS='-DLLVM_TARGETS_TO_BUILD=X86'

brew unlink create-dmg
brew link create-dmg
export Qt5_DIR="$BREW_X64_PATH/qt@5/lib/cmake/Qt5"
export SDL2_DIR="$BREW_X64_PATH/qt@5/lib/cmake/SDL2"

brew unlink ccache
brew link ccache
export PATH="$BREW_PATH/llvm@14/bin:$BREW_BIN:$BREW_SBIN:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:$PATH"
export LDFLAGS="-L$BREW_X64_PATH/lib -Wl,-rpath,$BREW_X64_PATH/lib"
export CPPFLAGS="-I$BREW_X64_PATH/include -msse -msse2 -mcx16 -no-pie"
export LIBRARY_PATH="$BREW_X64_PATH/lib"
export LD_LIBRARY_PATH="$BREW_X64_PATH/lib"

git submodule update --init --recursive --depth 1

Expand All @@ -57,16 +34,18 @@ sed -i '' "s/extern const double NSAppKitVersionNumber;/const double NSAppKitVer

mkdir build && cd build || exit 1

cmake .. \
-DUSE_SDL=ON -DUSE_DISCORD_RPC=OFF -DUSE_VULKAN=ON -DUSE_ALSA=OFF -DUSE_PULSE=OFF -DUSE_AUDIOUNIT=ON \
-DLLVM_CCACHE_BUILD=OFF -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF \
"$BREW_X64_PATH/bin/cmake" .. \
-DUSE_DISCORD_RPC=OFF -DUSE_VULKAN=ON -DUSE_ALSA=OFF -DUSE_PULSE=OFF -DUSE_AUDIOUNIT=ON \
-DLLVM_CCACHE_BUILD=OFF -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF \
-DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF \
-DLLVM_INCLUDE_UTILS=OFF -DLLVM_USE_PERF=OFF -DLLVM_ENABLE_Z3_SOLVER=OFF \
-DUSE_NATIVE_INSTRUCTIONS=OFF \
-DUSE_SYSTEM_MVK=OFF -DWITH_LLVM=ON \
-DUSE_SYSTEM_MVK=OFF \
$CMAKE_EXTRA_OPTS \
-DLLVM_TARGET_ARCH=X86_64 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_IGNORE_PATH="$BREW_PATH/lib" \
-G Ninja

ninja; build_status=$?;
"$BREW_PATH/bin/ninja"; build_status=$?;

cd ..

Expand Down
18 changes: 9 additions & 9 deletions .ci/deploy-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ mkdir "rpcs3.app/Contents/lib/"

cp "/usr/local/opt/llvm@14/lib/c++/libc++abi.1.0.dylib" "rpcs3.app/Contents/lib/libc++abi.1.dylib"

rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
"rpcs3.app/Contents/Frameworks/QtQml.framework" \
"rpcs3.app/Contents/Frameworks/QtQmlModels.framework" \
"rpcs3.app/Contents/Frameworks/QtQuick.framework" \
"rpcs3.app/Contents/Frameworks/QtVirtualKeyboard.framework" \
"rpcs3.app/Contents/Plugins/platforminputcontexts" \
"rpcs3.app/Contents/Plugins/virtualkeyboard"
#rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
#"rpcs3.app/Contents/Frameworks/QtQml.framework" \
#"rpcs3.app/Contents/Frameworks/QtQmlModels.framework" \
#"rpcs3.app/Contents/Frameworks/QtQuick.framework" \
#"rpcs3.app/Contents/Frameworks/QtVirtualKeyboard.framework" \
#"rpcs3.app/Contents/Plugins/platforminputcontexts" \
#"rpcs3.app/Contents/Plugins/virtualkeyboard"

# Need to do this rename hack due to case insensitive filesystem
mv rpcs3.app RPCS3_.app
Expand All @@ -35,7 +35,7 @@ echo "IconIndex=0" >> Quickstart.url

DMG_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_macos.dmg"

"/usr/local/bin/create-dmg" --volname RPCS3 \
/opt/homebrew/bin/create-dmg --volname RPCS3 \
--window-size 800 400 \
--icon-size 100 \
--icon rpcs3.app 200 190 \
Expand All @@ -47,7 +47,7 @@ DMG_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${COMM_TAG}-${COMM_COUNT}-$
"$DMG_FILEPATH" \
RPCS3.app

"/usr/local/bin/7z" a -mx9 rpcs3-v"${COMM_TAG}"-"${COMM_COUNT}"-"${COMM_HASH}"_macos.7z RPCS3.app
/opt/homebrew/bin/7z a -mx9 rpcs3-v"${COMM_TAG}"-"${COMM_COUNT}"-"${COMM_HASH}"_macos.7z RPCS3.app

FILESIZE=$(stat -f %z "$DMG_FILEPATH")
SHA256SUM=$(shasum -a 256 "$DMG_FILEPATH" | awk '{ print $1 }')
Expand Down

0 comments on commit 60a9963

Please sign in to comment.