Update test.yml

This commit is contained in:
quydang 2023-10-04 15:53:21 +07:00 committed by GitHub
parent 8ae604a52f
commit ecc9804932
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
name: Release X-UI (DEMO) name: Release X-UI
on: on:
push: push:
@ -10,7 +10,7 @@ jobs:
build: build:
strategy: strategy:
matrix: matrix:
platform: [amd64, arm64, armv7l] platform: [amd64, arm64, arm]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
@ -21,8 +21,8 @@ jobs:
with: with:
go-version: '1.21' go-version: '1.21'
- name: Install dependencies for arm64 and armv7l - name: Install dependencies for arm64 and arm
if: matrix.platform == 'arm64' || matrix.platform == 'armv7l' if: matrix.platform == 'arm64' || matrix.platform == 'arm'
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt install gcc-aarch64-linux-gnu sudo apt install gcc-aarch64-linux-gnu
@ -41,7 +41,7 @@ jobs:
export CGO_ENABLED=1 export CGO_ENABLED=1
export GOOS=linux export GOOS=linux
export GOARCH=${{ matrix.platform }} export GOARCH=${{ matrix.platform }}
if [ "${{ matrix.platform }}" == "arm64" ] || [ "${{ matrix.platform }}" == "armv7l" ]; then if [ "${{ matrix.platform }}" == "arm64" ] || [ "${{ matrix.platform }}" == "arm" ]; then
export CC=aarch64-linux-gnu-gcc export CC=aarch64-linux-gnu-gcc
fi fi
go build -o xui-release -v main.go go build -o xui-release -v main.go
@ -63,11 +63,10 @@ jobs:
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
else if [ "${{ matrix.platform }}" == "armv7l" ]; then else if [ "${{ matrix.platform }}" == "arm" ]; then
# Add the download link for the armv7l architecture here. wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm32-v7a.zip
# wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm32-v7a.zip unzip Xray-linux-arm32-v7a.zip
# unzip Xray-linux-arm32-v7a.zip 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