mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-31 15:26:18 +00:00
Update test.yml
This commit is contained in:
parent
880157526f
commit
c3b85167a7
1 changed files with 12 additions and 29 deletions
41
.github/workflows/test.yml
vendored
41
.github/workflows/test.yml
vendored
|
@ -8,9 +8,6 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [amd64, arm64, armv7]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
@ -21,11 +18,10 @@ jobs:
|
|||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
- name: Install dependencies for arm64 and armv7
|
||||
if: matrix.platform == 'arm64' || matrix.platform == 'armv7'
|
||||
- name: Install dependencies for armv7
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt install gcc-aarch64-linux-gnu
|
||||
sudo apt install gcc-arm-linux-gnueabihf
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
|
@ -40,13 +36,10 @@ jobs:
|
|||
run: |
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=linux
|
||||
export GOARCH=${{ matrix.platform }}
|
||||
if [ "${{ matrix.platform }}" == "arm64" ]; then
|
||||
export CC=aarch64-linux-gnu-gcc
|
||||
elif [ "${{ matrix.platform }}" == "armv7" ]; then
|
||||
export CC=arm-linux-gnueabihf-gcc
|
||||
export GOARM=7
|
||||
fi
|
||||
export GOARCH=arm
|
||||
export GOARM=7
|
||||
export CC=arm-linux-gnueabihf-gcc
|
||||
|
||||
go build -o xui-release -v main.go
|
||||
|
||||
mkdir x-ui
|
||||
|
@ -59,28 +52,18 @@ jobs:
|
|||
|
||||
- name: Download dependencies and package
|
||||
run: |
|
||||
if [ "${{ matrix.platform }}" == "amd64" ]; then
|
||||
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-64.zip
|
||||
unzip Xray-linux-64.zip
|
||||
rm -f Xray-linux-64.zip
|
||||
elif [ "${{ matrix.platform }}" == "arm64" ]; then
|
||||
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm64-v8a.zip
|
||||
unzip Xray-linux-arm64-v8a.zip
|
||||
rm -f Xray-linux-arm64-v8a.zip
|
||||
elif [ "${{ matrix.platform }}" == "armv7" ]; then
|
||||
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm32-v7a.zip
|
||||
unzip Xray-linux-arm32-v7a.zip
|
||||
rm -f Xray-linux-arm32-v7a.zip
|
||||
fi
|
||||
|
||||
rm -f geoip.dat geosite.dat iran.dat
|
||||
rm -f geoip.dat geosite.dat iran.dat
|
||||
|
||||
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
|
||||
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
|
||||
wget https://github.com/MasterKia/iran-hosted-domains/releases/latest/download/iran.dat
|
||||
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
|
||||
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
|
||||
wget https://github.com/MasterKia/iran-hosted-domains/releases/latest/download/iran.dat
|
||||
|
||||
mv xray xray-linux-${{ matrix.platform }}
|
||||
|
||||
mv xray xray-linux-armv7
|
||||
|
||||
- name: Package
|
||||
run: tar -zcvf x-ui-linux-${{ matrix.platform }}.tar.gz x-ui
|
||||
|
||||
|
|
Loading…
Reference in a new issue