Update demo_all.yml

This commit is contained in:
quydang 2023-09-28 13:42:52 +07:00 committed by GitHub
parent 6d6cd53e3d
commit c66b47ffae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,17 +21,32 @@ jobs:
with:
go-version: '1.21'
- name: Install dependencies for ARMv7
- name: Install dependencies for armv7
if: matrix.platform == 'armv7'
run: |
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'
run: |
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
run: |
@ -44,19 +59,14 @@ jobs:
- name: Build
run: |
export CGO_ENABLED=1
export GOOS=linux
if [ "${{ matrix.platform }}" == "amd64" ]; then
export GOARCH=amd64
elif [ "${{ matrix.platform }}" == "arm64" ]; then
export GOARCH=arm64
export CC=aarch64-linux-gnu-gcc
elif [ "${{ matrix.platform }}" == "armv7" ]; then
export GOARCH=arm
export GOARM=7
export CC=arm-linux-gnueabihf-gcc
fi
go build -o xui-release -v main.go
elif [ "${{ matrix.platform }}" == "arm64" ]; then
go build -o xui-release-arm64 -v main.go
elif [ "${{ matrix.platform }}" == "armv7" ]; then
go build -o xui-release-armv7 -v main.go
fi
mkdir x-ui
cp xui-release x-ui/
@ -64,6 +74,7 @@ jobs:
cp x-ui.sh x-ui/
mv x-ui/xui-release x-ui/x-ui
mkdir x-ui/bin
cd x-ui/bin
# Download dependencies
if [ "${{ matrix.platform }}" == "amd64" ]; then
@ -80,10 +91,6 @@ jobs:
rm -f Xray-linux-arm32-v7a.zip
fi
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/geosite.dat
wget https://github.com/MasterKia/iran-hosted-domains/releases/latest/download/iran.dat