mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-31 23:36: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
51
.github/workflows/demo_all.yml
vendored
51
.github/workflows/demo_all.yml
vendored
|
@ -20,18 +20,33 @@ jobs:
|
||||||
uses: actions/setup-go@v4.1.0
|
uses: actions/setup-go@v4.1.0
|
||||||
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: |
|
||||||
|
@ -42,29 +57,25 @@ jobs:
|
||||||
go get github.com/shirou/gopsutil/v3/mem
|
go get github.com/shirou/gopsutil/v3/mem
|
||||||
go get github.com/shirou/gopsutil/v3/net
|
go get github.com/shirou/gopsutil/v3/net
|
||||||
|
|
||||||
- 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/
|
||||||
cp x-ui.service x-ui/
|
cp x-ui.service x-ui/
|
||||||
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
|
||||||
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-64.zip
|
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-64.zip
|
||||||
|
@ -80,19 +91,15 @@ 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
|
||||||
mv xray xray-linux-${{ matrix.platform }}
|
mv xray xray-linux-${{ matrix.platform }}
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
run: tar -zcvf x-ui-linux-${{ matrix.platform }}.tar.gz x-ui
|
run: tar -zcvf x-ui-linux-${{ matrix.platform }}.tar.gz x-ui
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: svenstaro/upload-release-action@2.7.0
|
uses: svenstaro/upload-release-action@2.7.0
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue