Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Feb 25, 2024
1 parent b838edf commit ef9c358
Showing 1 changed file with 58 additions and 44 deletions.
102 changes: 58 additions & 44 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,50 @@ 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: 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: 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: 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: 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 }

steps:
Expand Down Expand Up @@ -170,6 +170,19 @@ jobs:
alien --to-rpm --scripts mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.deb
mv mihomo*.rpm mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.rpm
- name: Convert DEB to PKG
if: ${{ matrix.jobs.goos == 'linux' }}
run: |
docker pull archlinux
docker run --rm -v ./:/mnt archlinux bash -c "
pacman -Syu pkgfile base-devel --noconfirm
curl -L https://github.com/helixarch/debtap/raw/master/debtap > /usr/bin/debtap
chmod 755 /usr/bin/debtap
debtap -u
debtap -Q /mnt/mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.deb
"
ls
- name: Save version
run: |
echo ${VERSION} > version.txt
Expand All @@ -183,6 +196,7 @@ jobs:
mihomo*.gz
mihomo*.deb
mihomo*.rpm
mihomo*.pkg.tar.zst
mihomo*.zip
version.txt
Expand Down

0 comments on commit ef9c358

Please sign in to comment.