fix(build): ensure macOS packaging builds native dependencies and universal FFI binary
This commit is contained in:
parent
3c2be80ce6
commit
ec1fb1b5e7
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
# Miscellaneous
|
||||
.env
|
||||
*.py
|
||||
null/
|
||||
test/golden/failures/
|
||||
|
||||
|
||||
11
Makefile
11
Makefile
@ -110,11 +110,10 @@ package-rpm: ## Create the Linux .rpm package
|
||||
package-linux: ## Create both Linux packages
|
||||
bash scripts/package-linux.sh
|
||||
|
||||
package-mac: ## Create the macOS .app and DMG
|
||||
package-mac: ffi-integrate build-go-core ## Create the macOS .app and DMG
|
||||
XWORKMATE_APP_STORE=true bash scripts/package-flutter-mac-app.sh
|
||||
|
||||
install-mac: ## Package and install the macOS app into /Applications
|
||||
XWORKMATE_APP_STORE=true bash scripts/package-flutter-mac-app.sh
|
||||
install-mac: package-mac ## Package and install the macOS app into /Applications
|
||||
bash scripts/install-flutter-mac-dmg.sh
|
||||
|
||||
clean: ## Remove generated artifacts
|
||||
@ -129,12 +128,12 @@ check-export-compliance: ## Verify source and built Apple plist export-complianc
|
||||
|
||||
rust-build: rust-build-release ## Build Rust FFI library (release mode)
|
||||
|
||||
rust-build-release: ## Build Rust FFI library for macOS (arm64)
|
||||
cd rust && cargo build --release --target aarch64-apple-darwin
|
||||
rust-build-release: ## Build Rust FFI library for macOS (universal)
|
||||
bash scripts/build_rust_ffi.sh release
|
||||
@echo "Rust FFI library built successfully"
|
||||
|
||||
rust-build-debug: ## Build Rust FFI library in debug mode
|
||||
cd rust && cargo build --target aarch64-apple-darwin
|
||||
bash scripts/build_rust_ffi.sh debug
|
||||
|
||||
rust-test: ## Run Rust tests
|
||||
cd rust && cargo test
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
import os
|
||||
|
||||
path = '/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-bridge/.github/workflows/pipeline.yml'
|
||||
with open(path, 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
# Update the "Run Ansible deploy playbook" step to run directly instead of through deploy.sh
|
||||
target_step = ''' - name: Run Ansible deploy playbook
|
||||
working-directory: xworkmate-bridge
|
||||
env:
|
||||
INTERNAL_SERVICE_TOKEN: ${{ env.INTERNAL_SERVICE_TOKEN }}
|
||||
GHCR_USERNAME: ${{ env.GHCR_USERNAME }}
|
||||
GHCR_PASSWORD: ${{ env.GHCR_PASSWORD }}
|
||||
XWORKMATE_BRIDGE_IMAGE_ARTIFACT_PATH: ${{ github.workspace }}/xworkmate-bridge/dist/image-artifact/service-image-ref.txt
|
||||
run: bash ./scripts/github-actions/deploy.sh "${{ steps.deploy_meta.outputs.target_host }}" "${{ steps.deploy_meta.outputs.run_apply }}" ../playbooks'''
|
||||
|
||||
replacement_step = ''' - name: Run Ansible deploy playbook
|
||||
working-directory: playbooks
|
||||
env:
|
||||
ANSIBLE_CONFIG: ./ansible.cfg
|
||||
BRIDGE_AUTH_TOKEN: ${{ env.INTERNAL_SERVICE_TOKEN }}
|
||||
run: |
|
||||
SERVICE_COMPOSE_IMAGE="$(cat ../xworkmate-bridge/dist/image-artifact/service-image-ref.txt | xargs)"
|
||||
CHECK_MODE_FLAG=""
|
||||
if [[ "${{ steps.deploy_meta.outputs.run_apply }}" != "true" ]]; then
|
||||
CHECK_MODE_FLAG="-C"
|
||||
fi
|
||||
ansible-playbook -i inventory.ini deploy_xworkmate_bridge_vhosts.yml \\
|
||||
-D ${CHECK_MODE_FLAG} \\
|
||||
-l "${{ steps.deploy_meta.outputs.target_host }}" \\
|
||||
-e "service_compose_image=${SERVICE_COMPOSE_IMAGE}" \\
|
||||
-e "ghcr_username=${{ env.GHCR_USERNAME }}" \\
|
||||
-e "ghcr_password=${{ env.GHCR_PASSWORD }}"'''
|
||||
|
||||
content = content.replace(target_step, replacement_step)
|
||||
|
||||
with open(path, 'w') as f:
|
||||
f.write(content)
|
||||
@ -1,22 +0,0 @@
|
||||
import os
|
||||
|
||||
path = '/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-bridge/.github/workflows/pipeline.yml'
|
||||
with open(path, 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
# Redirect all xworkmate-bridge.svc.plus calls to the functional xworkmate-bridge.svc.plus sub-paths
|
||||
content = content.replace(
|
||||
'https://xworkmate-bridge.svc.plus/codex/acp/rpc',
|
||||
'https://xworkmate-bridge.svc.plus/acp-server/codex/acp/rpc'
|
||||
)
|
||||
content = content.replace(
|
||||
'https://xworkmate-bridge.svc.plus/opencode/acp/rpc',
|
||||
'https://xworkmate-bridge.svc.plus/acp-server/opencode/acp/rpc'
|
||||
)
|
||||
content = content.replace(
|
||||
'https://xworkmate-bridge.svc.plus/gemini/acp/rpc',
|
||||
'https://xworkmate-bridge.svc.plus/acp-server/gemini/acp/rpc'
|
||||
)
|
||||
|
||||
with open(path, 'w') as f:
|
||||
f.write(content)
|
||||
Loading…
Reference in New Issue
Block a user