Skip to content

Commit

Permalink
Update build parameter and mihomo test config
Browse files Browse the repository at this point in the history
  • Loading branch information
enfein committed Dec 5, 2024
1 parent 7f828fc commit d667a3a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ client-android: client-android-amd64 client-android-arm64
client-android-amd64:
if [ ! -z $$(command -v gcc) ]; then\
mkdir -p release/android/amd64;\
env GOOS=android GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/android/amd64/mieru cmd/mieru/mieru.go;\
env GOOS=android GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/android/amd64/mieru cmd/mieru/mieru.go;\
cd release/android/amd64;\
sha256sum mieru > mieru_${VERSION}_android_amd64.sha256.txt;\
tar -zcvf mieru_${VERSION}_android_amd64.tar.gz mieru;\
Expand All @@ -94,7 +94,7 @@ client-android-amd64:
client-android-arm64:
if [ ! -z $$(command -v gcc) ]; then\
mkdir -p release/android/arm64;\
env GOOS=android GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/android/arm64/mieru cmd/mieru/mieru.go;\
env GOOS=android GOARCH=arm64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/android/arm64/mieru cmd/mieru/mieru.go;\
cd release/android/arm64;\
sha256sum mieru > mieru_${VERSION}_android_arm64.sha256.txt;\
tar -zcvf mieru_${VERSION}_android_arm64.tar.gz mieru;\
Expand All @@ -112,7 +112,7 @@ client-linux: client-linux-amd64 client-linux-arm64 client-linux-armv7 client-li
.PHONY: client-linux-amd64
client-linux-amd64:
mkdir -p release/linux/amd64
env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/linux/amd64/mieru cmd/mieru/mieru.go
env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/linux/amd64/mieru cmd/mieru/mieru.go
cd release/linux/amd64;\
sha256sum mieru > mieru_${VERSION}_linux_amd64.sha256.txt;\
tar -zcvf mieru_${VERSION}_linux_amd64.tar.gz mieru;\
Expand All @@ -124,7 +124,7 @@ client-linux-amd64:
.PHONY: client-linux-arm64
client-linux-arm64:
mkdir -p release/linux/arm64
env GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/linux/arm64/mieru cmd/mieru/mieru.go
env GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/linux/arm64/mieru cmd/mieru/mieru.go
cd release/linux/arm64;\
sha256sum mieru > mieru_${VERSION}_linux_arm64.sha256.txt;\
tar -zcvf mieru_${VERSION}_linux_arm64.tar.gz mieru;\
Expand All @@ -136,7 +136,7 @@ client-linux-arm64:
.PHONY: client-linux-armv7
client-linux-armv7:
mkdir -p release/linux/armv7
env GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/linux/armv7/mieru cmd/mieru/mieru.go
env GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/linux/armv7/mieru cmd/mieru/mieru.go
cd release/linux/armv7;\
sha256sum mieru > mieru_${VERSION}_linux_armv7.sha256.txt;\
tar -zcvf mieru_${VERSION}_linux_armv7.tar.gz mieru;\
Expand All @@ -148,7 +148,7 @@ client-linux-armv7:
.PHONY: client-linux-riscv64
client-linux-riscv64:
mkdir -p release/linux/riscv64
env GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/linux/riscv64/mieru cmd/mieru/mieru.go
env GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/linux/riscv64/mieru cmd/mieru/mieru.go
cd release/linux/riscv64;\
sha256sum mieru > mieru_${VERSION}_linux_riscv64.sha256.txt;\
tar -zcvf mieru_${VERSION}_linux_riscv64.tar.gz mieru;\
Expand All @@ -164,7 +164,7 @@ client-mac: client-mac-amd64 client-mac-arm64
.PHONY: client-mac-amd64
client-mac-amd64:
mkdir -p release/macos/amd64
env GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/macos/amd64/mieru cmd/mieru/mieru.go
env GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/macos/amd64/mieru cmd/mieru/mieru.go
cd release/macos/amd64;\
sha256sum mieru > mieru_${VERSION}_macos_amd64.sha256.txt;\
tar -zcvf mieru_${VERSION}_macos_amd64.tar.gz mieru;\
Expand All @@ -176,7 +176,7 @@ client-mac-amd64:
.PHONY: client-mac-arm64
client-mac-arm64:
mkdir -p release/macos/arm64
env GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/macos/arm64/mieru cmd/mieru/mieru.go
env GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/macos/arm64/mieru cmd/mieru/mieru.go
cd release/macos/arm64;\
sha256sum mieru > mieru_${VERSION}_macos_arm64.sha256.txt;\
tar -zcvf mieru_${VERSION}_macos_arm64.tar.gz mieru;\
Expand All @@ -192,7 +192,7 @@ client-windows: client-windows-x86 client-windows-amd64
.PHONY: client-windows-x86
client-windows-x86:
mkdir -p release/windows/386
env GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/windows/386/mieru.exe cmd/mieru/mieru.go
env GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/windows/386/mieru.exe cmd/mieru/mieru.go
cd release/windows/386;\
sha256sum mieru.exe > mieru_${VERSION}_windows_x86.exe.sha256.txt;\
zip -r mieru_${VERSION}_windows_x86.zip mieru.exe;\
Expand All @@ -204,7 +204,7 @@ client-windows-x86:
.PHONY: client-windows-amd64
client-windows-amd64:
mkdir -p release/windows/amd64
env GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/windows/amd64/mieru.exe cmd/mieru/mieru.go
env GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/windows/amd64/mieru.exe cmd/mieru/mieru.go
cd release/windows/amd64;\
sha256sum mieru.exe > mieru_${VERSION}_windows_amd64.exe.sha256.txt;\
zip -r mieru_${VERSION}_windows_amd64.zip mieru.exe;\
Expand All @@ -220,15 +220,15 @@ server-linux: server-linux-amd64 server-linux-arm64
.PHONY: server-linux-amd64
server-linux-amd64:
mkdir -p release/linux/amd64
env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/linux/amd64/mita cmd/mita/mita.go
env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/linux/amd64/mita cmd/mita/mita.go
cd release/linux/amd64;\
sha256sum mita > mita_${VERSION}_linux_amd64.sha256.txt

# Build linux arm64 server.
.PHONY: server-linux-arm64
server-linux-arm64:
mkdir -p release/linux/arm64
env GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w" -o release/linux/arm64/mita cmd/mita/mita.go
env GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o release/linux/arm64/mita cmd/mita/mita.go
cd release/linux/arm64;\
sha256sum mita > mita_${VERSION}_linux_arm64.sha256.txt

Expand Down
4 changes: 4 additions & 0 deletions test/deploy/mihomo/mihomo-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
dns:
enable: true
nameserver:
- 8.8.8.8
log-level: warning
mixed-port: 1080
mode: rule
Expand Down

0 comments on commit d667a3a

Please sign in to comment.