Update demo.yml

This commit is contained in:
quydang 2023-09-26 19:37:16 +07:00 committed by GitHub
parent 127c56cda5
commit 6689abe018
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
name: Release X-UI name: Test Release X-UI
on: on:
push: push:
@ -10,7 +10,7 @@ jobs:
build: build:
strategy: strategy:
matrix: matrix:
platform: [amd64, arm64, arm32] platform: [amd64, arm64, arm]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
@ -20,18 +20,16 @@ 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 arm64 - name: Install dependencies for arm64 and arm
if: matrix.platform == 'arm64' if: matrix.platform != 'amd64' # Install dependencies only for non-amd64 platforms
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt install gcc-aarch64-linux-gnu if [ "${{ matrix.platform }}" == "arm64" ]; then
sudo apt install gcc-aarch64-linux-gnu
- name: Install dependencies for arm32 elif [ "${{ matrix.platform }}" == "arm" ]; then
if: matrix.platform == 'arm32' sudo apt install gcc-arm-linux-gnueabi
run: | fi
sudo apt-get update
sudo apt install gcc-arm-linux-gnueabi
- name: Get dependencies - name: Get dependencies
run: | run: |
@ -46,11 +44,11 @@ jobs:
run: | run: |
export CGO_ENABLED=1 export CGO_ENABLED=1
export GOOS=linux export GOOS=linux
export GOARCH=${{ matrix.platform }} if [ "${{ matrix.platform }}" == "arm" ]; then
if [ "${{ matrix.platform }}" == "arm64" ]; then export GOARCH=arm
export CC=aarch64-linux-gnu-gcc
elif [ "${{ matrix.platform }}" == "arm" ]; then
export CC=arm-linux-gnueabi-gcc export CC=arm-linux-gnueabi-gcc
else
export GOARCH=${{ matrix.platform }}
fi fi
go build -o xui-release -v main.go go build -o xui-release -v main.go
@ -67,14 +65,10 @@ jobs:
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
unzip Xray-linux-64.zip unzip Xray-linux-64.zip
rm -f Xray-linux-64.zip rm -f Xray-linux-64.zip
elif [ "${{ matrix.platform }}" == "arm64" ]; then else
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm64-v8a.zip wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm64-v8a.zip
unzip Xray-linux-arm64-v8a.zip unzip Xray-linux-arm64-v8a.zip
rm -f Xray-linux-arm64-v8a.zip rm -f Xray-linux-arm64-v8a.zip
elif [ "${{ matrix.platform }}" == "arm32" ]; then
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm32-v6.zip
unzip Xray-linux-arm32-v6.zip
rm -f Xray-linux-arm32-v6.zip
fi 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/geoip.dat