Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Feb 26, 2024
1 parent 3a37eef commit d2f0296
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
- { 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: loong64, output: loong64-abi1, abi: '1' }
- { goos: linux, goarch: loong64, output: loong64-abi2, abi: '2' }
- { goos: linux, goarch: riscv64, output: riscv64 }
- { goos: linux, goarch: s390x, output: s390x }

Expand Down Expand Up @@ -77,17 +78,31 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Go1.22
if: ${{ matrix.jobs.version != '20' }}
if: ${{ matrix.jobs.version != '20' && matrix.jobs.goarch != 'loong64' }}
uses: actions/setup-go@v5
with:
go-version: ^1.22

- name: Set up Go1.20
if: ${{ matrix.jobs.version == '20' }}
if: ${{ matrix.jobs.version == '20' && matrix.jobs.goarch != 'loong64' }}
uses: actions/setup-go@v5
with:
go-version: ^1.20

- name: Set up Go1.21 loongarch abi1
if: ${{ matrix.jobs.goarch == 'loong64' && matrix.jobs.abi == '1' }}
run: |
wget https://github.com/xishang0128/loongarch64-golang/releases/download/1.21.5/go1.21.5.linux-amd64-abi1.tar.gz
tar zxvf go1.21.5.linux-amd64-abi1.tar.gz -C /usr/local/
export PATH=$PATH:/usr/local/go/bin
- name: Set up Go1.21 loongarch abi2
if: ${{ matrix.jobs.goarch == 'loong64' && matrix.jobs.abi == '2' }}
run: |
wget https://github.com/xishang0128/loongarch64-golang/releases/download/1.21.5/go1.21.5.linux-amd64-abi2.tar.gz
tar zxvf go1.21.5.linux-amd64-abi1.tar.gz -C /usr/local/
export PATH=$PATH:/usr/local/go/bin
- name: Set variables
if: ${{github.ref_name=='Alpha'}}
run: echo "VERSION=alpha-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
Expand Down Expand Up @@ -141,7 +156,11 @@ jobs:
if: ${{ matrix.jobs.goos == 'linux' && !contains(matrix.jobs.goarch, 'mips') }}
run: |
sudo apt-get install dpkg
if [ "${{matrix.jobs.goarch}}" = "loong64" ]; then
ARCH=loongarch64
else
ARCH=${{matrix.jobs.goarch}}
fi
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/DEBIAN
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/usr/bin
mkdir -p mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}/etc/mihomo
Expand All @@ -162,7 +181,7 @@ jobs:
Version: 1.18.2-${VERSION}
Section:
Priority: extra
Architecture: ${{matrix.jobs.goarch}}
Architecture: ${ARCH}
Maintainer: MetaCubeX <[email protected]>
Homepage: https://wiki.metacubex.one/
Description: The universal proxy platform.
Expand All @@ -178,7 +197,7 @@ jobs:
mv mihomo*.rpm mihomo-${{matrix.jobs.goos}}-${{matrix.jobs.output}}-${VERSION}.rpm
- name: Convert DEB to PKG
if: ${{ matrix.jobs.goos == 'linux' && !contains(matrix.jobs.goarch, 'mips') }}
if: ${{ matrix.jobs.goos == 'linux' && !contains(matrix.jobs.goarch, 'mips') && !contains(matrix.jobs.goarch, 'loong') }}
run: |
docker pull archlinux
docker run --rm -v ./:/mnt archlinux bash -c "
Expand Down

0 comments on commit d2f0296

Please sign in to comment.