Skip to content

Commit d55308d

Browse files
committed
fix(android/Makefile): free space in the android x86_64 workflow to launch the emulator to run test; fix armeabi-v7a Makefile missing env var and arch name typo
1 parent fdcd10e commit d55308d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ jobs:
207207
cd /data/local/tmp
208208
$(make test PLATFORM=$PLATFORM ARCH=$ARCH -n)
209209
EOF
210+
rm -rf build # free space for the emulator
210211
echo "::endgroup::"
211212
212213
- name: android test sqlite-mcp

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,10 @@ all: extension
145145
OPENSSL_SRC = $(BUILD_DIR)/openssl
146146
OPENSSL_TARBALL = $(BUILD_DIR)/openssl-3.6.0.tar.gz
147147
$(OPENSSL_TARBALL):
148-
@mkdir -p $(BUILD_DIR)
149148
curl -L -o $(OPENSSL_TARBALL) https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz
150149

151150
$(OPENSSL_SRC): $(OPENSSL_TARBALL)
152-
tar -xzf $(OPENSSL_TARBALL) -C $(BUILD_DIR)
151+
tar -xzf $(OPENSSL_TARBALL) -C $(BUILD_DIR); \
153152
mv $(BUILD_DIR)/openssl-3.6.0 $(OPENSSL_SRC)
154153

155154
$(OPENSSL): $(OPENSSL_SRC)
@@ -223,10 +222,10 @@ else ifeq ($(PLATFORM),android)
223222
$(CARGO) build --release --target aarch64-linux-android
224223
@mkdir -p $(RUST_TARGET_DIR)/release
225224
cp $(RUST_TARGET_DIR)/aarch64-linux-android/release/libmcp_ffi.a $(RUST_TARGET_DIR)/release/libmcp_ffi.a
226-
else ifeq ($(ARCH),armv7)
225+
else ifeq ($(ARCH),armv7a)
227226
@echo "Checking Rust target for Android ARMv7..."
228227
@rustup target list | grep -q "armv7-linux-androideabi (installed)" || rustup target add armv7-linux-androideabi
229-
$(CARGO) build --release --target armv7-linux-androideabi
228+
CC=$(CC) AR=$(BIN)/llvm-ar $(CARGO) build --release --target armv7-linux-androideabi
230229
@mkdir -p $(RUST_TARGET_DIR)/release
231230
cp $(RUST_TARGET_DIR)/armv7-linux-androideabi/release/libmcp_ffi.a $(RUST_TARGET_DIR)/release/libmcp_ffi.a
232231
else ifeq ($(ARCH),x86_64)
@@ -351,6 +350,7 @@ help:
351350
@echo " staticlib - Build only the Rust static library"
352351
@echo " test - Run quick CLI test + C test suite"
353352
@echo " xcframework- Build XCFramework for Swift Package Manager (macOS/iOS)"
353+
@echo " aar - Build Android AAR package (requires ANDROID_NDK)"
354354
@echo " clean - Remove all build artifacts"
355355
@echo " version - Display extension version"
356356
@echo " help - Display this help message"
@@ -368,4 +368,4 @@ help:
368368
@echo " make test # Build and test"
369369
@echo " make PLATFORM=android ARCH=arm64-v8a # Build for Android ARM64"
370370

371-
.PHONY: all extension staticlib test xcframework clean version help
371+
.PHONY: all extension staticlib test xcframework aar clean version help

0 commit comments

Comments
 (0)