Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Feb 23, 2024
1 parent 9636fea commit 6d5dddc
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,32 @@ jobs:
- { goos: linux, goarch: amd64, output: x86_64 }
- { goos: linux, goarch: amd64, goamd64: v3, output: x86_64_v3 }
- { goos: linux, goarch: arm64, output: arm64 }
- { goos: linux, goarch: arm, goarm: '7', output: armv7 }
- { goos: linux, goarch: mips, mips: hardfloat, output: mips-hardfloat }
- { goos: linux, goarch: mips, mips: softfloat, output: mips-softfloat }
- { goos: linux, goarch: mipsle, mips: hardfloat, output: mipsle-hardfloat }
- { goos: linux, goarch: mipsle, mips: softfloat, output: mipsle-softfloat }
- { goos: linux, goarch: mips64, output: mips64 }
- { goos: linux, goarch: mips64le, output: mips64le }
- { goos: linux, goarch: loong64, output: loong64 }
- { goos: linux, goarch: risvc64, output: risvc64 }


- { goos: windows, goarch: '386', output: '386' }
- { goos: windows, goarch: amd64, output: x86_64 }
- { goos: windows, goarch: amd64, goamd64: v3, output: x86_64_v3 }
- { goos: windows, goarch: arm64, output: arm64 }

- { goos: freebsd, goarch: '386', goamd64: v3, output: '386' }
- { goos: freebsd, goarch: amd64, goamd64: v3, output: x86_64 }
- { goos: freebsd, goarch: '386', output: '386' }
- { goos: freebsd, goarch: amd64, output: x86_64 }
- { goos: freebsd, goarch: amd64, goamd64: v3, output: x86_64_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: x86_64, cgo: '1' }
- { goos: android, goarch: arm, ndk: armv7a-linux-androideabi34, output: armeabi-v7a, cgo: '1' }
- { goos: android, goarch: arm64, ndk: aarch64-linux-android34, output: arm64-v8a, cgo: '1' }

steps:
- uses: actions/checkout@v4

Expand All @@ -51,12 +66,22 @@ jobs:
echo "VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "BUILDTIME=$(date)" >> $GITHUB_ENV
- name: Setup NDK
if: ${{ matrix.jobs.goos == 'android' }}
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r26c

- name: build core
env:
GOOS: ${{matrix.jobs.goos}}
GOARCH: ${{matrix.jobs.goarch}}
GOAMD64: ${{matrix.jobs.goamd64}}
CGO_ENABLED: '0'
GOARM: ${{matrix.jobs.arm}}
GOMIPS: ${{matrix.jobs.mips}}
CC: ${{steps.setup-ndk.outputs.ndk-path}}/toolchains/llvm/prebuilt/linux-x86_64/bin/${{matrix.jobs.ndk}}-clang
CGO_ENABLED: ${{matrix.jobs.cgo}}
run: |
go build -v -tags "with_gvisor" -trimpath -ldflags "-X 'github.com/metacubex/mihomo/constant.Version=${VERSION}' -X 'github.com/metacubex/mihomo/constant.BuildTime=${BUILDTIME}' -w -s -buildid="
if [ "${GOOS}" = "windows" ]; then
Expand Down

0 comments on commit 6d5dddc

Please sign in to comment.