From e31bafe001f093b9508bceaf47833dd36702d4a3 Mon Sep 17 00:00:00 2001 From: Sarto Date: Wed, 15 Apr 2026 15:15:13 +0330 Subject: [PATCH] fix: update build configuration for Android ARM to use Linux settings --- .github/workflows/build.yml | 12 +++++++++--- Makefile | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0334f93..3ae4ab3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,9 +42,10 @@ jobs: goarch: amd64 - goos: android goarch: arm64 - - goos: android + - goos: linux goarch: arm goarm: '7' + android_arm: true steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 @@ -56,7 +57,7 @@ jobs: run: sudo apt-get update && sudo apt-get install -y upx-ucl - name: Build Server - if: matrix.goos != 'android' + if: matrix.goos != 'android' && !matrix.android_arm env: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} @@ -83,7 +84,12 @@ jobs: LDFLAGS="-s -w -X github.com/sartoopjj/thefeed/internal/version.Version=${VERSION} -X github.com/sartoopjj/thefeed/internal/version.Commit=${COMMIT} -X github.com/sartoopjj/thefeed/internal/version.Date=${DATE}" ext="" if [ "${{ matrix.goos }}" = "windows" ]; then ext=".exe"; fi - go build -trimpath -ldflags="${LDFLAGS}" -o build/thefeed-client-${{ matrix.goos }}-${{ matrix.goarch }}${ext} ./cmd/client + if [ "${{ matrix.android_arm }}" = "true" ]; then + out="build/thefeed-client-android-arm" + else + out="build/thefeed-client-${{ matrix.goos }}-${{ matrix.goarch }}${ext}" + fi + go build -trimpath -ldflags="${LDFLAGS}" -o "$out" ./cmd/client - name: Compress with UPX if: matrix.goos == 'linux' || matrix.goos == 'windows' diff --git a/Makefile b/Makefile index 2115b4a..b658c63 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ build-android-arm64: build-android-arm: @mkdir -p $(BUILD_DIR) - CGO_ENABLED=0 GOOS=android GOARCH=arm GOARM=7 go build $(GOFLAGS) -o $(BUILD_DIR)/$(BINARY_CLIENT)-android-arm ./cmd/client + GOOS=linux GOARCH=arm GOARM=7 go build $(GOFLAGS) -o $(BUILD_DIR)/$(BINARY_CLIENT)-android-arm ./cmd/client # UPX compression (requires upx in PATH) — only for Linux/Windows binaries upx: