mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-19 09:27:22 -04:00
Merge branch 'intel-mac-builds' into 'master'
[CI] Add intel mac build with separate build step See merge request OpenMW/openmw!4718
This commit is contained in:
commit
164563f522
8
.github/workflows/push.yml
vendored
8
.github/workflows/push.yml
vendored
@ -73,7 +73,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Building Dependencies
|
||||
run: CI/before_install.osx.sh
|
||||
run: CI/before_install.macos.sh
|
||||
|
||||
- name: Prime ccache
|
||||
uses: hendrikmuhs/ccache-action@v1
|
||||
@ -82,11 +82,9 @@ jobs:
|
||||
max-size: 1000M
|
||||
|
||||
- name: Configure
|
||||
run: CI/before_script.osx.sh
|
||||
run: CI/before_script.macos.sh
|
||||
- name: Build
|
||||
run: |
|
||||
cd build
|
||||
make -j $(sysctl -n hw.logicalcpu) package
|
||||
run: CI/macos/build.sh
|
||||
|
||||
Output-Envs:
|
||||
name: Read .env file and expose it as output
|
||||
|
@ -507,14 +507,15 @@ Ubuntu_GCC_integration_tests_asan:
|
||||
paths:
|
||||
- ccache/
|
||||
script:
|
||||
- CI/before_install.osx.sh
|
||||
- CI/before_install.macos.sh
|
||||
- export CCACHE_BASEDIR="$(pwd)"
|
||||
- export CCACHE_DIR="$(pwd)/ccache"
|
||||
- mkdir -pv "${CCACHE_DIR}"
|
||||
- ccache -z -M "${CCACHE_SIZE}"
|
||||
- CI/before_script.osx.sh
|
||||
- cd build; make -j $(sysctl -n hw.logicalcpu) package
|
||||
- for dmg in *.dmg; do mv "$dmg" "${dmg%.dmg}_${CI_COMMIT_REF_NAME##*/}.dmg"; done
|
||||
- CI/macos/ccache_prep.sh
|
||||
- CI/before_script.macos.sh
|
||||
- CI/macos/build.sh
|
||||
- cd build
|
||||
- for dmg in *.dmg; do mv "$dmg" "${dmg%.dmg}_${DMG_IDENTIFIER}_${CI_COMMIT_REF_NAME##*/}.dmg"; done
|
||||
- |
|
||||
if [[ -n "${AWS_ACCESS_KEY_ID}" ]]; then
|
||||
echo "[default]" > ~/.s3cfg
|
||||
@ -529,11 +530,23 @@ Ubuntu_GCC_integration_tests_asan:
|
||||
s3cmd put "${dmg}" s3://openmw-artifacts/${artifactDirectory}
|
||||
done
|
||||
fi
|
||||
- ccache -s
|
||||
- ../CI/macos/ccache_save.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- build/OpenMW-*.dmg
|
||||
|
||||
macOS14_Xcode15_amd64:
|
||||
extends: .MacOS
|
||||
image: macos-14-xcode-15
|
||||
tags:
|
||||
- saas-macos-medium-m1
|
||||
cache:
|
||||
key: macOS14_Xcode15_amd64.v2
|
||||
variables:
|
||||
CCACHE_SIZE: 3G
|
||||
DMG_IDENTIFIER: amd64
|
||||
MACOS_AMD64: true
|
||||
|
||||
macOS14_Xcode15_arm64:
|
||||
extends: .MacOS
|
||||
image: macos-14-xcode-15
|
||||
@ -542,6 +555,7 @@ macOS14_Xcode15_arm64:
|
||||
cache:
|
||||
key: macOS14_Xcode15_arm64.v1
|
||||
variables:
|
||||
DMG_IDENTIFIER: arm64
|
||||
CCACHE_SIZE: 3G
|
||||
|
||||
.Compress_And_Upload_Symbols_Base:
|
||||
@ -968,7 +982,7 @@ Windows_MSBuild_CacheInit:
|
||||
- flatpak build-bundle ./repo openmw.flatpak org.openmw.OpenMW.devel
|
||||
cache:
|
||||
key: flatpak
|
||||
paths:
|
||||
paths:
|
||||
- ".flatpak-builder"
|
||||
artifacts:
|
||||
untracked: false
|
||||
|
11
CI/before_install.macos.sh
Executable file
11
CI/before_install.macos.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
export HOMEBREW_NO_EMOJI=1
|
||||
export HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
export HOMEBREW_AUTOREMOVE=1
|
||||
|
||||
if [[ "${MACOS_AMD64}" ]]; then
|
||||
./CI/macos/before_install.amd64.sh
|
||||
else
|
||||
./CI/macos/before_install.arm64.sh
|
||||
fi
|
@ -1,29 +0,0 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
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
|
||||
|
||||
if [[ "${MACOS_AMD64}" ]]; then
|
||||
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
|
||||
else
|
||||
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
|
||||
fi
|
77
CI/before_script.macos.sh
Executable file
77
CI/before_script.macos.sh
Executable file
@ -0,0 +1,77 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Silence a git warning
|
||||
git config --global advice.detachedHead false
|
||||
|
||||
rm -fr build
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
DEPENDENCIES_ROOT="/tmp/openmw-deps"
|
||||
|
||||
if [[ "${MACOS_AMD64}" ]]; then
|
||||
QT_PATH=$(arch -x86_64 /usr/local/bin/brew --prefix qt@6)
|
||||
ICU_PATH=$(arch -x86_64 /usr/local/bin/brew --prefix icu4c)
|
||||
OPENAL_PATH=$(arch -x86_64 /usr/local/bin/brew --prefix openal-soft)
|
||||
CCACHE_EXECUTABLE=$(arch -x86_64 /usr/local/bin/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"
|
||||
-D CMAKE_C_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE"
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE"
|
||||
-D CMAKE_CXX_FLAGS="-stdlib=libc++"
|
||||
-D CMAKE_C_COMPILER="clang"
|
||||
-D CMAKE_CXX_COMPILER="clang++"
|
||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="13.6"
|
||||
-D OPENMW_USE_SYSTEM_RECASTNAVIGATION=TRUE
|
||||
-D Boost_INCLUDE_DIR="$DEPENDENCIES_ROOT/include"
|
||||
-D OSGPlugins_LIB_DIR="$DEPENDENCIES_ROOT/lib/osgPlugins-3.6.5"
|
||||
-D ICU_ROOT="$ICU_PATH"
|
||||
-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=TRUE
|
||||
-D BUILD_NIFTEST=TRUE
|
||||
-D BUILD_NAVMESHTOOL=TRUE
|
||||
-D BUILD_BULLETOBJECTTOOL=TRUE
|
||||
-G"Unix Makefiles"
|
||||
)
|
||||
|
||||
if [[ "${MACOS_AMD64}" ]]; then
|
||||
CMAKE_CONF_OPTS+=(
|
||||
-D CMAKE_OSX_ARCHITECTURES="x86_64"
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ "${CMAKE_BUILD_TYPE}" ]]; then
|
||||
CMAKE_CONF_OPTS+=(
|
||||
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
else
|
||||
CMAKE_CONF_OPTS+=(
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ "${MACOS_AMD64}" ]]; then
|
||||
arch -x86_64 cmake \
|
||||
"${CMAKE_CONF_OPTS[@]}" \
|
||||
"${BUILD_OPTS[@]}" \
|
||||
..
|
||||
else
|
||||
cmake \
|
||||
"${CMAKE_CONF_OPTS[@]}" \
|
||||
"${BUILD_OPTS[@]}" \
|
||||
..
|
||||
fi
|
@ -1,53 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Silence a git warning
|
||||
git config --global advice.detachedHead false
|
||||
|
||||
rm -fr build
|
||||
mkdir build
|
||||
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
|
||||
|
||||
declare -a CMAKE_CONF_OPTS=(
|
||||
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH;$OPENAL_PATH"
|
||||
-D CMAKE_C_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE"
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE"
|
||||
-D CMAKE_CXX_FLAGS="-stdlib=libc++"
|
||||
-D CMAKE_C_COMPILER="clang"
|
||||
-D CMAKE_CXX_COMPILER="clang++"
|
||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="13.6"
|
||||
-D OPENMW_USE_SYSTEM_RECASTNAVIGATION=TRUE
|
||||
-D Boost_INCLUDE_DIR="$DEPENDENCIES_ROOT/include"
|
||||
-D OSGPlugins_LIB_DIR="$DEPENDENCIES_ROOT/lib/osgPlugins-3.6.5"
|
||||
-D ICU_ROOT="$ICU_PATH"
|
||||
-D OPENMW_OSX_DEPLOYMENT=TRUE
|
||||
)
|
||||
|
||||
if [[ "${CMAKE_BUILD_TYPE}" ]]; then
|
||||
CMAKE_CONF_OPTS+=(
|
||||
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
else
|
||||
CMAKE_CONF_OPTS+=(
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
)
|
||||
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" \
|
||||
..
|
8
CI/macos/before_install.amd64.sh
Executable file
8
CI/macos/before_install.amd64.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 /usr/local/bin/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
|
16
CI/macos/before_install.arm64.sh
Executable file
16
CI/macos/before_install.arm64.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
|
||||
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
|
9
CI/macos/build.sh
Executable file
9
CI/macos/build.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
cd build
|
||||
|
||||
if [[ "${MACOS_AMD64}" ]]; then
|
||||
arch -x86_64 make -j $(sysctl -n hw.logicalcpu) package
|
||||
else
|
||||
make -j $(sysctl -n hw.logicalcpu) package
|
||||
fi
|
7
CI/macos/ccache_prep.sh
Executable file
7
CI/macos/ccache_prep.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
if [[ "${MACOS_AMD64}" ]]; then
|
||||
arch -x86_64 ccache -z -M "${CCACHE_SIZE}"
|
||||
else
|
||||
ccache -z -M "${CCACHE_SIZE}"
|
||||
fi
|
7
CI/macos/ccache_save.sh
Executable file
7
CI/macos/ccache_save.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
if [[ "${MACOS_AMD64}" ]]; then
|
||||
arch -x86_64 ccache -s
|
||||
else
|
||||
ccache -s
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user