Skip to content

Commit e55592c

Browse files
authored
Update build.yml
1 parent db28646 commit e55592c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ jobs:
3232
export CC="$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
3333
export CXX="$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++"
3434
export GOOS=android GOARCH=arm64 CGO_ENABLED=1
35+
# crucial: GOBIN must be unset for cross installs
36+
env -u GOBIN go install -tags netcgo github.com/kopia/kopia@v0.21.1
3537
mkdir -p out
36-
# Use go build (NOT go install) to avoid the GOBIN/cross-compile restriction.
37-
go build -tags netcgo -trimpath -ldflags="-s -w" \
38-
-o out/kopia github.com/kopia/kopia@v0.21.1
39-
file out/kopia
38+
cp "$(go env GOPATH)/bin/kopia" out/kopia
4039
4140
- name: Upload Android binary
4241
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)