[fix] fix iOS native builds and expose CI diagnostics

This commit is contained in:
dijunkun
2026-10-27 15:21:32 +08:00
parent 4506c27e7c
commit 99bb63f641
3 changed files with 55 additions and 5 deletions
+44 -1
View File
@@ -180,7 +180,37 @@ jobs:
python3 -B apps/ios/scripts/verify_native_build.py \
--xmake-version "${RUNNER_TEMP}/xmake-version.txt"
# Xcode buffers Run Script output until the phase finishes. Build the
# native archives here so dependency downloads and compiler commands are
# streamed to Actions; the Xcode phase then reuses the same build products.
- name: Build iOS native dependencies
timeout-minutes: 60
shell: bash
env:
CONFIGURATION: Release
PLATFORM_NAME: iphoneos
CURRENT_ARCH: arm64
CROSSDESK_NATIVE_VERBOSE: "1"
run: |
set -o pipefail
(
trap 'kill "${SLEEP_PID:-}" 2>/dev/null || true; exit 0' TERM INT
while true; do
sleep 60 &
SLEEP_PID=$!
wait "${SLEEP_PID}" || exit 0
echo "iOS native build still running at $(date -u +%FT%TZ)"
ps -axo pid,ppid,state,etime,pcpu,comm | \
awk 'NR == 1 || /xmake|clang|cmake|ninja|meson|python|git|curl|make|zsh/'
done
) &
MONITOR_PID=$!
trap 'kill "${MONITOR_PID}" 2>/dev/null || true; wait "${MONITOR_PID}" 2>/dev/null || true' EXIT
apps/ios/scripts/build_minirtc_ios.sh 2>&1 | \
tee "${RUNNER_TEMP}/ios-native-build.log"
- name: Build CrossDesk Mobile
timeout-minutes: 30
shell: bash
run: |
DERIVED_DATA="${RUNNER_TEMP}/CrossDeskMobileDerivedData"
@@ -196,7 +226,20 @@ jobs:
COMPILER_INDEX_STORE_ENABLE=NO \
MARKETING_VERSION="${IOS_VERSION_BASE}" \
IPHONEOS_DEPLOYMENT_TARGET="${IOS_DEPLOYMENT_TARGET}" \
build
build 2>&1 | tee "${RUNNER_TEMP}/ios-app-build.log"
- name: Upload iOS build diagnostics
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v6
with:
name: ios-build-diagnostics-${{ github.run_id }}-${{ github.run_attempt }}
path: |
${{ runner.temp }}/ios-native-build.log
${{ runner.temp }}/ios-app-build.log
~/.xmake/cache/packages/**/logs/*.txt
~/.xmake/cache/packages/**/meson-logs/meson-log.txt
include-hidden-files: true
if-no-files-found: ignore
- name: Verify CrossDesk Mobile
shell: bash
+10 -3
View File
@@ -9,6 +9,10 @@ MINIRTC_DIR="${REPO_DIR}/deps/submodules/minirtc"
CONFIG_NAME="${CONFIGURATION:-Debug}"
MODE="${CONFIG_NAME:l}"
MINIRTC_ENABLE_AOM="${MINIRTC_ENABLE_AOM:-false}"
XMAKE_LOG_FLAGS=()
if [[ "${CROSSDESK_NATIVE_VERBOSE:-0}" == "1" ]]; then
XMAKE_LOG_FLAGS=(-vD)
fi
if [[ "${MINIRTC_ENABLE_AOM}" != "true" && "${MINIRTC_ENABLE_AOM}" != "false" ]]; then
print -u2 "MINIRTC_ENABLE_AOM must be true or false."
exit 64
@@ -139,7 +143,8 @@ configure_xmake() {
if [[ ! -f "${stamp}" || "$(<"${stamp}")" != "${CONFIG_SIGNATURE}" ]]; then
clean_flags=(-c)
fi
run_xmake f -P "${project_dir}" "${clean_flags[@]}" -o "${build_dir}" \
print "Configuring iOS native project: ${project_dir}"
run_xmake f -P "${project_dir}" "${clean_flags[@]}" "${XMAKE_LOG_FLAGS[@]}" -o "${build_dir}" \
-p iphoneos -a arm64 --appledev="${APPLE_DEVICE}" -m "${MODE}" --target_minver=16.0 \
--policies=package.precompiled:n -y "$@"
mkdir -p "${build_dir}"
@@ -154,7 +159,8 @@ configure_xmake() {
configure_xmake "${MINIRTC_DIR}" "${MINIRTC_BUILD_DIR}" \
--as="${XMAKE_TOOLCHAIN_BIN}/clang" --USE_CUDA=false \
--MINIRTC_ENABLE_AOM="${MINIRTC_ENABLE_AOM}"
run_xmake b -P "${MINIRTC_DIR}" minirtc
print "Building MiniRTC for ${SDK_NAME} (${MODE})"
run_xmake b -P "${MINIRTC_DIR}" "${XMAKE_LOG_FLAGS[@]}" minirtc
)
if [[ ! -f "${MINIRTC_LIBRARY}" ]]; then
@@ -168,7 +174,8 @@ fi
(
cd "${WIRE_WORK_DIR}"
configure_xmake "${WIRE_WORK_DIR}" "${WIRE_BUILD_DIR}"
run_xmake b -P "${WIRE_WORK_DIR}" crossdesk_wire
print "Building CrossDesk wire for ${SDK_NAME} (${MODE})"
run_xmake b -P "${WIRE_WORK_DIR}" "${XMAKE_LOG_FLAGS[@]}" crossdesk_wire
)
if [[ ! -f "${WIRE_LIBRARY}" ]]; then