ci: add loong64 build

This commit is contained in:
Markson Hon 2023-12-11 19:58:02 +08:00
parent 7721c96d59
commit a72e9fa908
4 changed files with 20 additions and 6 deletions

View File

@ -53,7 +53,7 @@ jobs:
strategy:
matrix:
goos: [ linux ]
goarch: [ amd64, arm64, 386, riscv64, mips64, mips64le, mipsle, mips ]
goarch: [ amd64, arm64, 386, riscv64, mips64, mips64le, mipsle, mips, loong64 ]
include:
# BEGIN Linux ARM 5 6 7
- goos: linux
@ -252,7 +252,7 @@ jobs:
strategy:
matrix:
goos: [linux]
goarch: [amd64, arm64, 386, riscv64, mips64, mips64le, mipsle, mips]
goarch: [amd64, arm64, 386, riscv64, mips64, mips64le, mipsle, mips, loong64]
include:
- goos: linux
goarch: arm
@ -338,6 +338,8 @@ jobs:
package_arch='armhfp'
elif [ "$GOARCH" == 'arm64' ];then
package_arch='aarch64'
elif [ "$GOARCH" == 'loong64' ];then
package_arch='loongson64'
else
package_arch="$GOARCH"
fi
@ -470,7 +472,7 @@ jobs:
run: |
mkdir xray_unzipped
mkdir v2ray_unzipped
for arch in 64 32 arm64-v8a arm32-v7a mips32 mips32le mips64 mips64le riscv64; do
for arch in 64 32 arm64-v8a arm32-v7a mips32 mips32le mips64 mips64le riscv64 loong64; do
wget -q https://github.com/v2fly/v2ray-core/releases/download/$V2RAY_VERSION/v2ray-linux-$arch.zip
unzip -q v2ray-linux-$arch.zip -d v2ray_unzipped/v2ray-linux-$arch
wget -q https://github.com/XTLS/xray-core/releases/download/$XRAY_VERSION/Xray-linux-$arch.zip
@ -480,7 +482,7 @@ jobs:
run: |
mkdir v2ray_packages
package_version="$(echo "$V2RAY_VERSION" | sed 's/v//g')" # Remove the leading 'v' in version number
for arch in amd64 i386 arm64 armhf mips mips32le mips64 mips64le riscv64; do
for arch in amd64 i386 arm64 armhf mips mips32le mips64 mips64le riscv64 loong64; do
case $arch in
amd64)
source_dir="v2ray_unzipped/v2ray-linux-64"
@ -509,6 +511,9 @@ jobs:
riscv64)
source_dir="v2ray_unzipped/v2ray-linux-riscv64"
;;
loong64)
source_dir="v2ray_unzipped/v2ray-linux-loong64"
;;
esac
echo 'systemctl daemon-reload
if [ "$(systemctl is-active v2ray)" = "active" ]; then
@ -536,7 +541,7 @@ jobs:
run: |
mkdir xray_packages
package_version="$(echo "$XRAY_VERSION" | sed 's/v//g')" # Remove the leading 'v' in version number
for arch in amd64 i386 arm64 armhf mips mips32le mips64 mips64le riscv64; do
for arch in amd64 i386 arm64 armhf mips mips32le mips64 mips64le riscv64 loong64; do
case $arch in
amd64)
source_dir="xray_unzipped/xray-linux-64"
@ -565,6 +570,9 @@ jobs:
riscv64)
source_dir="xray_unzipped/xray-linux-riscv64"
;;
loong64)
source_dir="xray_unzipped/xray-linux-loong64"
;;
esac
fpm -s dir -t deb -a $arch --version $package_version \
--url 'https://xtls.github.io/' --description 'Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration' \
@ -616,6 +624,7 @@ jobs:
echo "v2ray core version: $v2ray_version"
xray_version="$(cat builds/xray_packages_version.txt/xray_packages_version.txt | awk -F 'v' '{print $2}')"
echo "xray core version: $xray_version"
mv builds/installer*.deb ./
mv builds/v2ray_*_$v2ray_version.deb ./
mv builds/xray_*_$xray_version.deb ./
ls -lh ./

View File

@ -32,6 +32,9 @@
"linux-riscv64": {
"friendlyName": "linux_riscv64"
},
"linux-loong64": {
"friendlyName": "linux_loongarch64"
},
"windows-amd64": {
"friendlyName": "windows_x64"
},

View File

@ -34,7 +34,7 @@ require (
github.com/v2rayA/v2ray-lib v0.0.0-20230812093950-85439332d5ce
github.com/v2rayA/v2rayA-lib4 v0.0.0-20230812094818-595f87cb2a49
github.com/vearutop/statigz v1.1.7
go.etcd.io/bbolt v1.3.6
go.etcd.io/bbolt v1.3.8
golang.org/x/net v0.17.0
golang.org/x/sys v0.13.0
google.golang.org/grpc v1.57.1

View File

@ -264,6 +264,8 @@ gitlab.com/yawning/chacha20.git v0.0.0-20230427033715-7877545b1b37 h1:ZrWBE3u/o9
gitlab.com/yawning/chacha20.git v0.0.0-20230427033715-7877545b1b37/go.mod h1:3x6b94nWCP/a2XB/joOPMiGYUBvqbLfeY/BkHLeDs6s=
go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA=
go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
go.starlark.net v0.0.0-20230612165344-9532f5667272 h1:2/wtqS591wZyD2OsClsVBKRPEvBsQt/Js+fsCiYhwu8=
go.starlark.net v0.0.0-20230612165344-9532f5667272/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds=
go4.org/netipx v0.0.0-20230728184502-ec4c8b891b28 h1:zLxFnORHDFTSkJPawMU7LzsuGQJ4MUFS653jJHpORow=