Compare commits

...

2 Commits

Author SHA1 Message Date
bd5bfb0f1e
ci: remove unused remote_contract job from build-and-release workflow (#71)
The remote_contract job was effectively dead code — it only ran on
workflow_dispatch (excluded push and pull_request events) and was
configured with continue-on-error, so it never blocked releases.

Removing it simplifies the pipeline and eliminates the always()
workaround in the release job's if-condition.

Co-authored-by: Haitao Pan <manbuzhe2009@qq.com>
2026-06-30 13:59:47 +08:00
d130ea31e2
fix(macos): generate matching WebRTC framework dSYM (#68)
Co-authored-by: Haitao Pan <manbuzhe2009@qq.com>
2026-06-30 13:24:04 +08:00
2 changed files with 23 additions and 53 deletions

View File

@ -304,46 +304,9 @@ jobs:
path: ${{ matrix.artifact_paths }}
if-no-files-found: error
remote_contract:
name: Test - remote provider contract
runs-on: ubuntu-22.04
needs:
- build
# Test-stage quality gate: runs between build and release.
# continue-on-error keeps it skippable so a failure never blocks release.
continue-on-error: true
if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }}
steps:
- name: Checkout source
uses: actions/checkout@v7
- name: Load Vault secrets
id: vault
uses: hashicorp/vault-action@v4
with:
url: ${{ env.VAULT_ADDR }}
method: jwt
role: github-actions-xworkmate-app
jwtGithubAudience: vault
ignoreNotFound: true
secrets: |
kv/data/github-actions/xworkmate-app REVIEW_ACCOUNT_LOGIN_PASSWORD | REVIEW_ACCOUNT_LOGIN_PASSWORD
- name: Export remote contract secrets
run: echo "REVIEW_ACCOUNT_LOGIN_PASSWORD=${{ steps.vault.outputs.REVIEW_ACCOUNT_LOGIN_PASSWORD }}" >> "$GITHUB_ENV"
- name: Verify accounts to bridge provider contract
shell: bash
env:
REVIEW_ACCOUNT_BASE_URL: ${{ vars.REVIEW_ACCOUNT_BASE_URL }}
REVIEW_ACCOUNT_LOGIN_NAME: ${{ vars.REVIEW_ACCOUNT_LOGIN_NAME }}
run: bash ./scripts/ci/verify_remote_provider_contract.sh
release:
# always() so release waits for the remote_contract gate to finish but is
# never blocked by it being skipped (e.g. push events) or failing.
# build/prepare must still genuinely succeed.
if: ${{ always() && needs.prepare.outputs.should_release == 'true' && needs.prepare.result == 'success' && needs.build.result == 'success' }}
if: ${{ needs.prepare.outputs.should_release == 'true' && needs.prepare.result == 'success' && needs.build.result == 'success' }}
strategy:
fail-fast: false
matrix:
@ -366,7 +329,6 @@ jobs:
needs:
- prepare
- build
- remote_contract
steps:
- name: Checkout source
uses: actions/checkout@v7

View File

@ -1,8 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
# Generate the dSYM that App Store validation expects for the vendored
# objective_c native-asset framework after Xcode/CocoaPods embed it.
# Generate dSYMs that App Store validation expects for embedded frameworks.
# Some prebuilt dependencies, including WebRTC, do not ship a dSYM even though
# their Mach-O binaries contain UUIDs that App Store Connect requires.
if [[ "${CONFIGURATION:-}" != "Release" && "${CONFIGURATION:-}" != "Profile" ]]; then
exit 0
fi
@ -22,6 +23,22 @@ fi
mkdir -p "${DWARF_DSYM_FOLDER_PATH}"
dsym_matches_binary() {
local binary_path="$1"
local dsym_path="$2"
local binary_uuids dsym_uuids uuid
[[ -d "${dsym_path}" ]] || return 1
binary_uuids="$(xcrun dwarfdump --uuid "${binary_path}" 2>/dev/null || true)"
dsym_uuids="$(xcrun dwarfdump --uuid "${dsym_path}" 2>/dev/null || true)"
[[ -n "${binary_uuids}" && -n "${dsym_uuids}" ]] || return 1
while read -r uuid; do
[[ -z "${uuid}" ]] || grep -Fq "${uuid}" <<<"${dsym_uuids}" || return 1
done < <(awk '/^UUID:/ { print $2 }' <<<"${binary_uuids}")
}
for framework_path in "${frameworks_dir}"/*.framework; do
[[ -d "${framework_path}" ]] || continue
@ -29,10 +46,8 @@ for framework_path in "${frameworks_dir}"/*.framework; do
binary_path="${framework_path}/${framework_name}"
[[ -f "${binary_path}" ]] || continue
[[ "${framework_name}" == "objective_c" ]] || continue
dsym_path="${DWARF_DSYM_FOLDER_PATH}/${framework_name}.framework.dSYM"
if [[ -d "${dsym_path}" ]]; then
if dsym_matches_binary "${binary_path}" "${dsym_path}"; then
continue
fi
@ -40,17 +55,10 @@ for framework_path in "${frameworks_dir}"/*.framework; do
continue
fi
echo "Generating missing dSYM for ${framework_name}.framework"
echo "Generating missing or mismatched dSYM for ${framework_name}.framework"
rm -rf "${dsym_path}"
if ! xcrun dsymutil "${binary_path}" -o "${dsym_path}" >/dev/null 2>&1; then
echo "warning: Failed to generate dSYM for ${framework_name}.framework" >&2
rm -rf "${dsym_path}" || true
fi
done
# Workaround for App Store Connect bug where it expects the DWARF file for App.framework to be named "A"
# because the binary is located at App.framework/Versions/A/App.
app_dwarf_dir="${DWARF_DSYM_FOLDER_PATH}/App.framework.dSYM/Contents/Resources/DWARF"
if [[ -d "${app_dwarf_dir}" && -f "${app_dwarf_dir}/App" && ! -f "${app_dwarf_dir}/A" ]]; then
echo "Applying workaround: Copying App DWARF file to A for App Store Connect validation"
cp "${app_dwarf_dir}/App" "${app_dwarf_dir}/A"
fi