Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Feb 24, 2024
1 parent 2ca3066 commit f011ecb
Showing 1 changed file with 42 additions and 41 deletions.
83 changes: 42 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,51 +20,51 @@ jobs:
strategy:
matrix:
jobs:
- { goos: darwin, goarch: arm64, output: arm64 }
- { goos: darwin, goarch: amd64, goamd64: v1, output: amd64-compatible }
- { goos: darwin, goarch: amd64, goamd64: v3, output: amd64 }

- { goos: linux, goarch: '386', output: '386' }
- { goos: linux, goarch: amd64, goamd64: v1, output: amd64-compatible }
- { goos: linux, goarch: amd64, goamd64: v3, output: amd64 }
- { 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: riscv64, output: riscv64 }
- { goos: linux, goarch: s390x, output: s390x }

- { goos: windows, goarch: '386', output: '386' }
- { goos: windows, goarch: amd64, goamd64: v1, output: amd64-compatible }
- { goos: windows, goarch: amd64, goamd64: v3, output: amd64 }
- { goos: windows, goarch: arm64, output: arm64 }

- { goos: freebsd, goarch: '386', output: '386' }
- { goos: freebsd, goarch: amd64, goamd64: v1, output: amd64-compatible }
- { goos: freebsd, goarch: amd64, goamd64: v3, output: amd64 }
- { goos: freebsd, goarch: arm64, output: arm64 }

- { 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: darwin, goarch: arm64, output: arm64 }
# - { goos: darwin, goarch: amd64, goamd64: v1, output: amd64-compatible }
# - { goos: darwin, goarch: amd64, goamd64: v3, output: amd64 }

# - { goos: linux, goarch: '386', output: '386' }
# - { goos: linux, goarch: amd64, goamd64: v1, output: amd64-compatible }
# - { goos: linux, goarch: amd64, goamd64: v3, output: amd64 }
# - { 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: riscv64, output: riscv64 }
# - { goos: linux, goarch: s390x, output: s390x }

# - { goos: windows, goarch: '386', output: '386' }
# - { goos: windows, goarch: amd64, goamd64: v1, output: amd64-compatible }
# - { goos: windows, goarch: amd64, goamd64: v3, output: amd64 }
# - { goos: windows, goarch: arm64, output: arm64 }

# - { goos: freebsd, goarch: '386', output: '386' }
# - { goos: freebsd, goarch: amd64, goamd64: v1, output: amd64-compatible }
# - { goos: freebsd, goarch: amd64, goamd64: v3, output: amd64 }
# - { goos: freebsd, goarch: arm64, output: arm64 }

# - { 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 }

- { goos: windows, goarch: '386', output: '386-go120', version: 20 }
- { goos: windows, goarch: amd64, goamd64: v1, output: amd64-compatible-go120, version: 20 }
- { goos: windows, goarch: amd64, goamd64: v3, output: amd64-go120, version: 20 }
# - { goos: windows, goarch: '386', output: '386-go120', version: 20 }
# - { goos: windows, goarch: amd64, goamd64: v1, output: amd64-compatible-go120, version: 20 }
# - { goos: windows, goarch: amd64, goamd64: v3, output: amd64-go120, version: 20 }

- { goos: darwin, goarch: arm64, output: arm64-go120, version: 20 }
- { goos: darwin, goarch: amd64, goamd64: v1, output: amd64-compatible-go120, version: 20 }
- { goos: darwin, goarch: amd64, goamd64: v3, output: amd64-go120, version: 20 }
# - { goos: darwin, goarch: arm64, output: arm64-go120, version: 20 }
# - { goos: darwin, goarch: amd64, goamd64: v1, output: amd64-compatible-go120, version: 20 }
# - { goos: darwin, goarch: amd64, goamd64: v3, output: amd64-go120, version: 20 }

- { goos: linux, goarch: '386', output: '386-go120', version: 20 }
- { goos: linux, goarch: amd64, goamd64: v1, output: amd64-compatible-go120, version: 20 }
- { goos: linux, goarch: amd64, goamd64: v3, output: amd64-go120, version: 20 }
# - { goos: linux, goarch: '386', output: '386-go120', version: 20 }
# - { goos: linux, goarch: amd64, goamd64: v1, output: amd64-compatible-go120, version: 20 }
# - { goos: linux, goarch: amd64, goamd64: v3, output: amd64-go120, version: 20 }

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -117,6 +117,7 @@ jobs:
GOARM: ${{matrix.jobs.arm}}
GOMIPS: ${{matrix.jobs.mips}}
run: |
echo $CGO_ENABLED
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
cp mihomo.exe mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.exe
Expand Down

0 comments on commit f011ecb

Please sign in to comment.