Reproducible Builds for libhysteria2.so (#4249)
* Patch Go use 600296 * -buildvcs=false for libhysteria2 * fix if * fixup! Build and cache libhysteria2.so (#4226)
This commit is contained in:
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -95,7 +95,14 @@ jobs:
|
||||
if: steps.cache-libhysteria2-restore.outputs.cache-hit != 'true'
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-mod-file: 'AndroidLibXrayLite/go.mod'
|
||||
go-version-file: 'AndroidLibXrayLite/go.mod'
|
||||
|
||||
- name: Patch Go use 600296
|
||||
if: steps.cache-libhysteria2-restore.outputs.cache-hit != 'true'
|
||||
#https://go-review.googlesource.com/c/go/+/600296
|
||||
run: |
|
||||
cd "$(go env GOROOT)"
|
||||
curl "https://go-review.googlesource.com/changes/go~600296/revisions/5/patch" | base64 -d | patch --verbose -p 1
|
||||
|
||||
- name: Build libhysteria2
|
||||
if: steps.cache-libhysteria2-restore.outputs.cache-hit != 'true'
|
||||
|
||||
@@ -14,7 +14,7 @@ for target in "${targets[@]}"; do
|
||||
|
||||
echo "Building for ${abi} with ${ndk_target} (${goarch})"
|
||||
|
||||
CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/${ndk_target}-clang" CGO_ENABLED=1 CGO_LDFLAGS="-Wl,-z,max-page-size=16384" GOOS=android GOARCH=$goarch go build -o libs/$abi/libhysteria2.so -trimpath -ldflags "-s -w -buildid=" ./app
|
||||
CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/${ndk_target}-clang" CGO_ENABLED=1 CGO_LDFLAGS="-Wl,-z,max-page-size=16384" GOOS=android GOARCH=$goarch go build -o libs/$abi/libhysteria2.so -trimpath -ldflags "-s -w -buildid=" -buildvcs=false ./app
|
||||
|
||||
echo "Built libhysteria2.so for ${abi}"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user