mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-07 10:46:19 +00:00
Update test.yml
This commit is contained in:
parent
8bd49837e3
commit
8b93a7af88
1 changed files with 15 additions and 10 deletions
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
|
@ -10,8 +10,7 @@ jobs:
|
|||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [amd64, arm64, arm]
|
||||
goarm: [null, null, 7]
|
||||
platform: [amd64, arm64, armv7, armv6l]
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
@ -22,25 +21,27 @@ jobs:
|
|||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
- name: Install dependencies for arm64 and arm
|
||||
if: matrix.platform == 'arm64' || matrix.platform == 'arm'
|
||||
- name: Install dependencies for arm64, armv7 and armv6l
|
||||
if: matrix.platform == 'arm64' || matrix.platform == 'armv7' || matrix.platform == 'armv6l'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt install gcc-aarch64-linux-gnu
|
||||
if [ "${{ matrix.platform }}" == "arm" ]; then
|
||||
if [ "${{ matrix.platform }}" == "armv7" ] || [ "${{ matrix.platform }}" == "armv6l" ]; then
|
||||
sudo apt install gcc-arm-linux-gnueabihf
|
||||
fi
|
||||
|
||||
- name: Build x-ui
|
||||
run: |
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=linux
|
||||
export GOARCH=${{ matrix.platform }}
|
||||
if [ "${{ matrix.platform }}" == "arm64" ]; then
|
||||
export GOARCH=arm64
|
||||
export CC=aarch64-linux-gnu-gcc
|
||||
elif [ "${{ matrix.platform }}" == "arm" ]; then
|
||||
elif [ "${{ matrix.platform }}" == "armv7" ] || [ "${{ matrix.platform }}" == "armv6l" ]; then
|
||||
export GOARCH=arm
|
||||
export GOARM=7
|
||||
export CC=arm-linux-gnueabihf-gcc
|
||||
export GOARM=${{ matrix.goarm }}
|
||||
else
|
||||
export GOARCH=${{ matrix.platform }}
|
||||
fi
|
||||
go build -o xui-release -v main.go
|
||||
|
||||
|
@ -62,10 +63,14 @@ jobs:
|
|||
wget ${Xray_URL}Xray-linux-arm64-v8a.zip
|
||||
unzip Xray-linux-arm64-v8a.zip
|
||||
rm -f Xray-linux-arm64-v8a.zip
|
||||
else
|
||||
elif [ "${{ matrix.platform }}" == "armv7" ] || [ "${{ matrix.platform }}" == "armv6l" ]; then
|
||||
wget ${Xray_URL}Xray-linux-arm32-v7a.zip
|
||||
unzip Xray-linux-arm32-v7a.zip
|
||||
rm -f Xray-linux-arm32-v7a.zip
|
||||
else
|
||||
wget ${Xray_URL}Xray-linux-${{ matrix.platform }}.zip
|
||||
unzip Xray-linux-${{ matrix.platform }}.zip
|
||||
rm -f Xray-linux-${{ matrix.platform }}.zip
|
||||
fi
|
||||
rm -f geoip.dat geosite.dat geoip_IR.dat geosite_IR.dat geoip_VN.dat geosite_VN.dat
|
||||
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
|
||||
|
|
Loading…
Reference in a new issue