mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-21 02:44:05 -04:00
[CI] Fork before install mac arm/intel steps, prefix with arch command
This commit is contained in:
parent
0f551c8233
commit
139bde6420
@ -4,21 +4,8 @@ export HOMEBREW_NO_EMOJI=1
|
||||
export HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
export HOMEBREW_AUTOREMOVE=1
|
||||
|
||||
brew tap --repair
|
||||
brew update --quiet
|
||||
|
||||
brew install curl xquartz gd fontconfig freetype harfbuzz brotli s3cmd
|
||||
|
||||
command -v ccache >/dev/null 2>&1 || brew install ccache
|
||||
command -v cmake >/dev/null 2>&1 || brew install cmake
|
||||
command -v qmake >/dev/null 2>&1 || brew install qt@6
|
||||
|
||||
# Install deps
|
||||
brew install openal-soft icu4c yaml-cpp sqlite
|
||||
|
||||
ccache --version
|
||||
cmake --version
|
||||
qmake --version
|
||||
|
||||
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20240818-arm64.tar.xz -o ~/openmw-deps.tar.xz
|
||||
tar xf ~/openmw-deps.tar.xz -C /tmp > /dev/null
|
||||
if [[ "${MACOS_X86_64}" ]]; then
|
||||
./CI/macos/before_install.x86_64.sh
|
||||
else
|
||||
./CI/macos/before_install.arm.sh
|
||||
fi
|
||||
|
@ -9,10 +9,17 @@ cd build
|
||||
|
||||
DEPENDENCIES_ROOT="/tmp/openmw-deps"
|
||||
|
||||
QT_PATH=$(brew --prefix qt@6)
|
||||
ICU_PATH=$(brew --prefix icu4c)
|
||||
OPENAL_PATH=$(brew --prefix openal-soft)
|
||||
CCACHE_EXECUTABLE=$(brew --prefix ccache)/bin/ccache
|
||||
if [[ "${MACOS_X86_64}" ]]; then
|
||||
QT_PATH=$(arch -x86_64 brew --prefix qt@6)
|
||||
ICU_PATH=$(arch -x86_64 brew --prefix icu4c)
|
||||
OPENAL_PATH=$(arch -x86_64 brew --prefix openal-soft)
|
||||
CCACHE_EXECUTABLE=$(arch -x86_64 brew --prefix ccache)/bin/ccache
|
||||
else
|
||||
QT_PATH=$(brew --prefix qt@6)
|
||||
ICU_PATH=$(brew --prefix icu4c)
|
||||
OPENAL_PATH=$(brew --prefix openal-soft)
|
||||
CCACHE_EXECUTABLE=$(brew --prefix ccache)/bin/ccache
|
||||
fi
|
||||
|
||||
declare -a CMAKE_CONF_OPTS=(
|
||||
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH;$OPENAL_PATH"
|
||||
@ -29,6 +36,18 @@ declare -a CMAKE_CONF_OPTS=(
|
||||
-D OPENMW_OSX_DEPLOYMENT=TRUE
|
||||
)
|
||||
|
||||
declare -a BUILD_OPTS=(
|
||||
-D BUILD_OPENMW=TRUE
|
||||
-D BUILD_OPENCS=TRUE
|
||||
-D BUILD_ESMTOOL=TRUE
|
||||
-D BUILD_BSATOOL=TRUE
|
||||
-D BUILD_ESSIMPORTER=TRU
|
||||
-D BUILD_NIFTEST=TRUE
|
||||
-D BUILD_NAVMESHTOOL=TRUE
|
||||
-D BUILD_BULLETOBJECTTOOL=TRUE
|
||||
-G"Unix Makefiles"
|
||||
)
|
||||
|
||||
if [[ "${MACOS_X86_64}" ]]; then
|
||||
CMAKE_CONF_OPTS+=(
|
||||
-D CMAKE_OSX_ARCHITECTURES="x86_64"
|
||||
@ -45,15 +64,14 @@ else
|
||||
)
|
||||
fi
|
||||
|
||||
cmake \
|
||||
"${CMAKE_CONF_OPTS[@]}" \
|
||||
-D BUILD_OPENMW=TRUE \
|
||||
-D BUILD_OPENCS=TRUE \
|
||||
-D BUILD_ESMTOOL=TRUE \
|
||||
-D BUILD_BSATOOL=TRUE \
|
||||
-D BUILD_ESSIMPORTER=TRUE \
|
||||
-D BUILD_NIFTEST=TRUE \
|
||||
-D BUILD_NAVMESHTOOL=TRUE \
|
||||
-D BUILD_BULLETOBJECTTOOL=TRUE \
|
||||
-G"Unix Makefiles" \
|
||||
..
|
||||
if [[ "${MACOS_X86_64}" ]]; then
|
||||
arch -x86_64 cmake \
|
||||
"${CMAKE_CONF_OPTS[@]}" \
|
||||
"${BUILD_OPTS[@]}" \
|
||||
..
|
||||
else
|
||||
cmake \
|
||||
"${CMAKE_CONF_OPTS[@]}" \
|
||||
"${BUILD_OPTS[@]}" \
|
||||
..
|
||||
fi
|
||||
|
20
CI/macos/before_install.arm.sh
Executable file
20
CI/macos/before_install.arm.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
brew tap --repair
|
||||
brew update --quiet
|
||||
|
||||
brew install curl xquartz gd fontconfig freetype harfbuzz brotli s3cmd
|
||||
|
||||
command -v ccache >/dev/null 2>&1 || brew install ccache
|
||||
command -v cmake >/dev/null 2>&1 || brew install cmake
|
||||
command -v qmake >/dev/null 2>&1 || brew install qt@6
|
||||
|
||||
# Install deps
|
||||
brew install openal-soft icu4c yaml-cpp sqlite
|
||||
|
||||
ccache --version
|
||||
cmake --version
|
||||
qmake --version
|
||||
|
||||
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20240818-arm64.tar.xz -o ~/openmw-deps.tar.xz
|
||||
tar xf ~/openmw-deps.tar.xz -C /tmp > /dev/null
|
8
CI/macos/before_install.x86_64.sh
Executable file
8
CI/macos/before_install.x86_64.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
|
||||
arch -x86_64 brew install curl xquartz gd fontconfig freetype harfbuzz brotli s3cmd ccache cmake qt@6 openal-soft icu4c yaml-cpp sqlite
|
||||
|
||||
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20240802.zip -o ~/openmw-deps.zip
|
||||
unzip -o ~/openmw-deps.zip -d /tmp > /dev/null
|
Loading…
x
Reference in New Issue
Block a user