mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-03 16:56:18 +00:00
Update demo_all.yml
This commit is contained in:
parent
6d6cd53e3d
commit
c66b47ffae
1 changed files with 29 additions and 22 deletions
39
.github/workflows/demo_all.yml
vendored
39
.github/workflows/demo_all.yml
vendored
|
@ -21,17 +21,32 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: '1.21'
|
go-version: '1.21'
|
||||||
|
|
||||||
- name: Install dependencies for ARMv7
|
- name: Install dependencies for armv7
|
||||||
if: matrix.platform == 'armv7'
|
if: matrix.platform == 'armv7'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y gcc-arm-linux-gnueabihf
|
sudo apt install gcc-arm-linux-gnueabihf
|
||||||
|
|
||||||
- name: Install dependencies for ARM64
|
- name: Install dependencies for arm64
|
||||||
if: matrix.platform == 'arm64'
|
if: matrix.platform == 'arm64'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y gcc-aarch64-linux-gnu
|
sudo apt install gcc-aarch64-linux-gnu
|
||||||
|
|
||||||
|
- name: Set up environment for armv7
|
||||||
|
if: matrix.platform == 'armv7'
|
||||||
|
run: |
|
||||||
|
export CGO_ENABLED=1
|
||||||
|
export GOARCH=arm
|
||||||
|
export GOARM=7
|
||||||
|
export CC=arm-linux-gnueabihf-gcc
|
||||||
|
|
||||||
|
- name: Set up environment for arm64
|
||||||
|
if: matrix.platform == 'arm64'
|
||||||
|
run: |
|
||||||
|
export CGO_ENABLED=1
|
||||||
|
export GOARCH=arm64
|
||||||
|
export CC=aarch64-linux-gnu-gcc
|
||||||
|
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -44,19 +59,14 @@ jobs:
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
export CGO_ENABLED=1
|
|
||||||
export GOOS=linux
|
export GOOS=linux
|
||||||
if [ "${{ matrix.platform }}" == "amd64" ]; then
|
if [ "${{ matrix.platform }}" == "amd64" ]; then
|
||||||
export GOARCH=amd64
|
go build -o xui-release -v main.go
|
||||||
elif [ "${{ matrix.platform }}" == "arm64" ]; then
|
elif [ "${{ matrix.platform }}" == "arm64" ]; then
|
||||||
export GOARCH=arm64
|
go build -o xui-release-arm64 -v main.go
|
||||||
export CC=aarch64-linux-gnu-gcc
|
|
||||||
elif [ "${{ matrix.platform }}" == "armv7" ]; then
|
elif [ "${{ matrix.platform }}" == "armv7" ]; then
|
||||||
export GOARCH=arm
|
go build -o xui-release-armv7 -v main.go
|
||||||
export GOARM=7
|
|
||||||
export CC=arm-linux-gnueabihf-gcc
|
|
||||||
fi
|
fi
|
||||||
go build -o xui-release -v main.go
|
|
||||||
|
|
||||||
mkdir x-ui
|
mkdir x-ui
|
||||||
cp xui-release x-ui/
|
cp xui-release x-ui/
|
||||||
|
@ -64,6 +74,7 @@ jobs:
|
||||||
cp x-ui.sh x-ui/
|
cp x-ui.sh x-ui/
|
||||||
mv x-ui/xui-release x-ui/x-ui
|
mv x-ui/xui-release x-ui/x-ui
|
||||||
mkdir x-ui/bin
|
mkdir x-ui/bin
|
||||||
|
cd x-ui/bin
|
||||||
|
|
||||||
# Download dependencies
|
# Download dependencies
|
||||||
if [ "${{ matrix.platform }}" == "amd64" ]; then
|
if [ "${{ matrix.platform }}" == "amd64" ]; then
|
||||||
|
@ -80,10 +91,6 @@ jobs:
|
||||||
rm -f Xray-linux-arm32-v7a.zip
|
rm -f Xray-linux-arm32-v7a.zip
|
||||||
fi
|
fi
|
||||||
rm -f geoip.dat geosite.dat iran.dat
|
rm -f geoip.dat geosite.dat iran.dat
|
||||||
|
|
||||||
# Add this line to skip replacing README.md
|
|
||||||
unzip -o -d xray-linux-${{ matrix.platform }} Xray-linux-${{ matrix.platform }}.zip -x README.md
|
|
||||||
|
|
||||||
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.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/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/MasterKia/iran-hosted-domains/releases/latest/download/iran.dat
|
||||||
|
|
Loading…
Reference in a new issue