From 6c44b6de0f0c7db2b5738a9b0dc44dfc30afbdfa Mon Sep 17 00:00:00 2001 From: xishang0128 Date: Sun, 25 Feb 2024 02:43:52 +0800 Subject: [PATCH] 1 --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b01aead95..22c5285b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: # - { goos: linux, goarch: '386', output: '386' } # - { goos: linux, goarch: amd64, output: amd64 } - - { goos: linux, goarch: amd64, goamd64: v3, output: amd64_v3, cgo: '0' } + - { goos: linux, goarch: amd64, goamd64: v3, output: amd64_v3 } # - { goos: linux, goarch: arm64, output: arm64 } # - { goos: linux, goarch: arm, goarm: '7', output: armv7 } # - { goos: linux, goarch: mips, mips: hardfloat, output: mips-hardfloat } @@ -51,10 +51,10 @@ jobs: # - { goos: freebsd, goarch: amd64, goamd64: v3, output: amd64_v3 } # - { goos: freebsd, goarch: arm64, output: arm64 } - # - { goos: android, goarch: '386', ndk: i686-linux-android34, output: '386', cgo: '1'} - # - { goos: android, goarch: amd64, ndk: x86_64-linux-android34, output: amd64, cgo: '1' } - # - { goos: android, goarch: arm, ndk: armv7a-linux-androideabi34, output: armv7, cgo: '1' } - # - { goos: android, goarch: arm64, ndk: aarch64-linux-android34, output: arm64-v8, cgo: '1' } + # - { goos: android, goarch: '386', ndk: i686-linux-android34, output: '386' } + # - { goos: android, goarch: amd64, ndk: x86_64-linux-android34, output: amd64 } + # - { goos: android, goarch: arm, ndk: armv7a-linux-androideabi34, output: armv7 } + # - { goos: android, goarch: arm64, ndk: aarch64-linux-android34, output: arm64-v8 } steps: - uses: actions/checkout@v4 @@ -86,6 +86,7 @@ jobs: if: ${{ matrix.jobs.goos == 'android' }} run: | echo "CC=${{steps.setup-ndk.outputs.ndk-path}}/toolchains/llvm/prebuilt/linux-x86_64/bin/${{matrix.jobs.ndk}}-clang" >> $GITHUB_ENV + echo "CGO_ENABLED=1" >> $GITHUB_ENV - name: build core env: @@ -94,7 +95,6 @@ jobs: GOAMD64: ${{matrix.jobs.goamd64}} GOARM: ${{matrix.jobs.arm}} GOMIPS: ${{matrix.jobs.mips}} - CGO_ENABLED: ${{matrix.jobs.cgo}} run: | go build -v -tags "with_gvisor" -trimpath -ldflags "-extldflags --static -X 'github.com/metacubex/mihomo/constant.Version=${VERSION}' -X 'github.com/metacubex/mihomo/constant.BuildTime=${BUILDTIME}' -w -s -buildid=" if [ "${{matrix.jobs.goos}}" = "windows" ]; then