Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
ci: fix macOS host ARM64 emulator target, autodetect Darwin/Linux SDK/NDK, and reuse Makefile targets in E2E script
Antonio Ojeaab69fd7809d1
diff --git a/.github/workflows/test_flutter.yaml b/.github/workflows/test_flutter.yamlindex 31d93658..c4305c42 100644--- a/.github/workflows/test_flutter.yaml+++ b/.github/workflows/test_flutter.yaml@@ -70,5 +70,5 @@ jobs:with:api-level: 30target: google_apis- arch: x86_64+ arch: arm64-v8ascript: ./mobile/mobile_e2e.shdiff --git a/Makefile b/Makefileindex dabf9927..d5ba173a 100644--- a/Makefile+++ b/Makefile@@ -6,12 +6,20 @@ CGO_ENABLED=0export GOROOT GO111MODULE CGO_ENABLED# Autodetect Android SDK and NDK-ANDROID_HOME_RESOLVED:=$(if $(ANDROID_HOME),$(ANDROID_HOME),$(HOME)/Android/Sdk)+ANDROID_HOME_RESOLVED:=$(if $(ANDROID_HOME),$(ANDROID_HOME),$(firstword $(wildcard $(HOME)/Android/Sdk $(HOME)/Library/Android/sdk)))ANDROID_NDK_LATEST:=$(shell ls -d $(ANDROID_HOME_RESOLVED)/ndk/* 2>/dev/null | sort -V | tail -n 1)-ANDROID_NDK_TOOLCHAIN=$(ANDROID_NDK_LATEST)/toolchains/llvm/prebuilt/linux-x86_64/bin++UNAME_S := $(shell uname -s)+HOST_OS_NAME := linux-x86_64+ifeq ($(UNAME_S),Darwin)+ HOST_OS_NAME := darwin-x86_64+endif++ANDROID_NDK_TOOLCHAIN=$(ANDROID_NDK_LATEST)/toolchains/llvm/prebuilt/$(HOST_OS_NAME)/binANDROID_CC_ARM64=$(ANDROID_NDK_TOOLCHAIN)/aarch64-linux-android30-clangANDROID_CC_X86_64=$(ANDROID_NDK_TOOLCHAIN)/x86_64-linux-android30-clang+build:go build -v -o "$(OUT_DIR)/sam-node" ./cmd/sam-nodego build -v -o "$(OUT_DIR)/sam-hub" ./cmd/sam-hubdiff --git a/mobile/mobile_e2e.sh b/mobile/mobile_e2e.shindex ec92f666..908f4a72 100755--- a/mobile/mobile_e2e.sh+++ b/mobile/mobile_e2e.sh@@ -40,9 +40,10 @@ fi# 2. Build host binariesmake build-# 3. Build FFI library for the Android Emulator architecture (x86_64)-mkdir -p mobile/sam-node-app/android/app/src/main/jniLibs/x86_64-GOOS=android GOARCH=amd64 CGO_ENABLED=1 go build -v -buildmode=c-shared -o mobile/sam-node-app/android/app/src/main/jniLibs/x86_64/libsam.so ./mobile/sam-node-ffi+# 3. Build Android FFI library using the Makefile and copy to Flutter jniLibs+make mobile-ffi-android+mkdir -p mobile/sam-node-app/android/app/src/main/jniLibs/arm64-v8a+cp bin/android/libsam.so mobile/sam-node-app/android/app/src/main/jniLibs/arm64-v8a/libsam.so# 4. Start the mock OIDC serverpython3 tests/e2e/docker/mock_oidc.py &