diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54d6789..1356cd3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,26 +18,26 @@ jobs: fail-fast: false matrix: job: - - { name: 'android', os: 'ubuntu-latest', target: 'android' } - - { name: 'linux-amd64', os: 'ubuntu-20.04', target: 'linux-amd64' } - - { name: "windows-amd64", os: 'ubuntu-latest', target: 'windows-amd64', aarch: 'x64' } - - { name: "macos-universal", os: 'macos-11', target: 'macos-universal' } - - { name: "ios", os: "macos-11", target: "ios" } + - { name: 'hiddify-core-android', os: 'ubuntu-latest', target: 'android' } + - { name: 'hiddify-core-linux-amd64', os: 'ubuntu-20.04', target: 'linux-amd64' } + - { name: "hiddify-core-windows-amd64", os: 'ubuntu-latest', target: 'windows-amd64', aarch: 'x64' } + - { name: "hiddify-core-macos-universal", os: 'macos-11', target: 'macos-universal' } + - { name: "hiddify-coreios", os: "macos-11", target: "ios" } # linux custom - - {name: linux-amd64-v1, goos: linux, goarch: amd64, goamd64: v1, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-amd64-v3, goos: linux, goarch: amd64, goamd64: v3, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-386, goos: linux, goarch: 386, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-arm64, goos: linux, goarch: arm64, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-armv5, goos: linux, goarch: arm, goarm: 5, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-armv6, goos: linux, goarch: arm, goarm: 6, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-armv7, goos: linux, goarch: arm, goarm: 7, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-mips-softfloat, goos: linux, goarch: mips, gomips: softfloat, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-mips-hardfloat, goos: linux, goarch: mips, gomips: hardfloat, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-mipsel-softfloat, goos: linux, goarch: mipsle, gomips: softfloat, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-mipsel-hardfloat, goos: linux, goarch: mipsle, gomips: hardfloat, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-mips64, goos: linux, goarch: mips64, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-mips64el, goos: linux, goarch: mips64le, target: 'linux-custom', os: 'ubuntu-20.04'} - - {name: linux-s390x, goos: linux, goarch: s390x, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-amd64, goos: linux, goarch: amd64, goamd64: v1, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-amd64-v3, goos: linux, goarch: amd64, goamd64: v3, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-386, goos: linux, goarch: 386, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-arm64, goos: linux, goarch: arm64, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-armv5, goos: linux, goarch: arm, goarm: 5, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-armv6, goos: linux, goarch: arm, goarm: 6, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-armv7, goos: linux, goarch: arm, goarm: 7, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-mips-softfloat, goos: linux, goarch: mips, gomips: softfloat, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-mips-hardfloat, goos: linux, goarch: mips, gomips: hardfloat, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-mipsel-softfloat, goos: linux, goarch: mipsle, gomips: softfloat, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-mipsel-hardfloat, goos: linux, goarch: mipsle, gomips: hardfloat, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-mips64, goos: linux, goarch: mips64, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-mips64el, goos: linux, goarch: mips64le, target: 'linux-custom', os: 'ubuntu-20.04'} + - {name: hiddify-cli-linux-s390x, goos: linux, goarch: s390x, target: 'linux-custom', os: 'ubuntu-20.04'} runs-on: ${{ matrix.job.os }} env: @@ -96,8 +96,8 @@ jobs: rm ./hiddify-libcore*sources* ||echo "no source" rm ./hiddify-libcore-macos-a*.dylib || echo "no macos arm and amd" files=$(ls | grep -E '^(libcore\.(dll|so|dylib|aar)|webui|Libcore.xcframework|HiddifyCli(\.exe)?)$') - echo tar -czvf hiddify-core-${{ matrix.job.name }}.tar.gz $files - tar -czvf hiddify-core-${filename}.tar.gz $files + echo tar -czvf ${{ matrix.job.name }}.tar.gz $files + tar -czvf ${{ matrix.job.name }}.tar.gz $files working-directory: bin - uses: actions/upload-artifact@v3 diff --git a/Makefile b/Makefile index c60395a..ba75d1b 100644 --- a/Makefile +++ b/Makefile @@ -66,8 +66,8 @@ linux-amd64: linux-custom: mkdir -p $(BINDIR)/ - env $(GOBUILDSRV) -o $(BINDIR)/$(CLINAME) ./cli/ - #go build -trimpath -tags $(TAGS) -o $(BINDIR)/$(CLINAME) ./cli/ + #env GOARCH=mips $(GOBUILDSRV) -o $(BINDIR)/$(CLINAME) ./cli/ + go build -trimpath -tags $(TAGS) -o $(BINDIR)/$(CLINAME) ./cli/ chmod +x $(BINDIR)/$(CLINAME) make webui diff --git a/bridge/bridge.go b/bridge/bridge.go index 3391d96..cdd9659 100644 --- a/bridge/bridge.go +++ b/bridge/bridge.go @@ -1,3 +1,4 @@ +// +build cgo package bridge // #include "stdint.h" diff --git a/bridge/bridge_stub.go b/bridge/bridge_stub.go new file mode 100644 index 0000000..be021a9 --- /dev/null +++ b/bridge/bridge_stub.go @@ -0,0 +1,11 @@ +//go:build !cgo +// +build !cgo + +package bridge + +import "unsafe" + +func InitializeDartApi(api unsafe.Pointer) { +} +func SendStringToPort(port int64, msg string) { +} diff --git a/global/standalone.go b/global/standalone.go index 22ad347..be9819b 100644 --- a/global/standalone.go +++ b/global/standalone.go @@ -1,6 +1,5 @@ package global -import "C" import ( "encoding/json" "fmt" diff --git a/global/status.go b/global/status.go index abf08d4..4ab85ac 100644 --- a/global/status.go +++ b/global/status.go @@ -1,6 +1,5 @@ package global -import "C" import ( "encoding/json"