mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-11-03 04:22:43 +08:00
[fix] provide host pkg-config for Xcode Cloud dependencies
This commit is contained in:
+7
-4
@@ -150,11 +150,14 @@ Commit and push the intended signing settings and shared scheme to the branch
|
||||
selected by the workflow before starting a build.
|
||||
|
||||
Xcode Cloud automatically runs `ci_scripts/ci_post_clone.sh` next to the Xcode
|
||||
project. It installs Xmake, CMake, and Python 3.13 with Homebrew, prepares an
|
||||
project. It installs Xmake, CMake, pkgconf, and Python 3.13 with Homebrew, prepares an
|
||||
isolated host Python environment with pip/setuptools/wheel, verifies the minimum
|
||||
Xmake version, and initializes the pinned MiniRTC submodules. The native build
|
||||
phase selects these tools again and preserves Cloud's proxy settings for package
|
||||
downloads. No manual workflow PATH setting or `sudo` command is required.
|
||||
Xmake version and host `pkg-config`, and initializes the pinned MiniRTC submodules.
|
||||
It exposes both `pkgconf` and `pkg-config` from the Homebrew formula in the host
|
||||
tool directory, allowing GLib's Meson build to resolve Xmake's iOS PCRE2 and
|
||||
libffi packages instead of compiling bundled fallback versions. The native build
|
||||
phase checks and selects these tools again and preserves Cloud's proxy settings
|
||||
for package downloads. No manual workflow PATH setting or `sudo` command is required.
|
||||
|
||||
For **Archive - iOS**, `ci_scripts/ci_pre_xcodebuild.sh` builds the native
|
||||
dependencies before `xcodebuild`, using `Release / iphoneos / arm64` to match the
|
||||
|
||||
@@ -13,8 +13,9 @@ if ! command -v brew >/dev/null 2>&1; then
|
||||
fi
|
||||
|
||||
echo "Installing Xcode Cloud native build tools"
|
||||
brew install xmake cmake python@3.13
|
||||
brew install xmake cmake pkgconf python@3.13
|
||||
BREW_PREFIX="$(brew --prefix)"
|
||||
PKGCONF_PREFIX="$(brew --prefix pkgconf)"
|
||||
PYTHON_PREFIX="$(brew --prefix python@3.13)"
|
||||
|
||||
# Match GitHub Actions' host Python dependencies without modifying Homebrew's
|
||||
@@ -25,6 +26,14 @@ PYTHON_PREFIX="$(brew --prefix python@3.13)"
|
||||
for tool in xmake xrepo cmake ctest cpack; do
|
||||
ln -sf "${BREW_PREFIX}/bin/${tool}" "${HOST_TOOLS_DIR}/bin/${tool}"
|
||||
done
|
||||
# Meson needs the host pkg-config executable to find Xmake's iOS packages.
|
||||
# Without it, GLib falls back to bundled PCRE2/libffi sources. Use the formula's
|
||||
# prefix so an older pkg-config elsewhere on PATH cannot shadow this tool.
|
||||
for tool in pkgconf pkg-config; do
|
||||
ln -sf "${PKGCONF_PREFIX}/bin/${tool}" "${HOST_TOOLS_DIR}/bin/${tool}"
|
||||
done
|
||||
echo "Verifying Xcode Cloud host pkg-config"
|
||||
"${HOST_TOOLS_DIR}/bin/pkg-config" --version
|
||||
|
||||
"${HOST_TOOLS_DIR}/bin/xmake" --version > "${HOST_TOOLS_DIR}/xmake-version.txt"
|
||||
"${HOST_TOOLS_DIR}/bin/python3" -B "${IOS_DIR}/scripts/verify_native_build.py" \
|
||||
|
||||
@@ -50,10 +50,12 @@ fi
|
||||
# tools again here instead of relying on exported PATH changes surviving.
|
||||
if [[ "${CI_XCODE_CLOUD:-}" == "TRUE" ]]; then
|
||||
CLOUD_HOST_BIN="${IOS_DIR}/.xmake/xcode-cloud-host/bin"
|
||||
if [[ ! -x "${CLOUD_HOST_BIN}/xmake" || ! -x "${CLOUD_HOST_BIN}/python3" ]]; then
|
||||
print -u2 "Xcode Cloud build tools are missing. Run ci_scripts/ci_post_clone.sh before building."
|
||||
exit 69
|
||||
fi
|
||||
for host_tool in xmake python3 pkg-config; do
|
||||
if [[ ! -x "${CLOUD_HOST_BIN}/${host_tool}" ]]; then
|
||||
print -u2 "Xcode Cloud host tool ${host_tool} is missing. Run ci_scripts/ci_post_clone.sh before building."
|
||||
exit 69
|
||||
fi
|
||||
done
|
||||
export PATH="${CLOUD_HOST_BIN}:${PATH}"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user