disable cgo for cli only build
This commit is contained in:
42
.github/workflows/release.yml
vendored
42
.github/workflows/release.yml
vendored
@@ -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
|
||||
|
||||
4
Makefile
4
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
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// +build cgo
|
||||
package bridge
|
||||
|
||||
// #include "stdint.h"
|
||||
|
||||
11
bridge/bridge_stub.go
Normal file
11
bridge/bridge_stub.go
Normal file
@@ -0,0 +1,11 @@
|
||||
//go:build !cgo
|
||||
// +build !cgo
|
||||
|
||||
package bridge
|
||||
|
||||
import "unsafe"
|
||||
|
||||
func InitializeDartApi(api unsafe.Pointer) {
|
||||
}
|
||||
func SendStringToPort(port int64, msg string) {
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package global
|
||||
|
||||
import "C"
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package global
|
||||
|
||||
import "C"
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user