mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-31 23:36:18 +00:00
Update armv7.yml
This commit is contained in:
parent
11ef65e291
commit
1d89daf563
1 changed files with 29 additions and 10 deletions
39
.github/workflows/armv7.yml
vendored
39
.github/workflows/armv7.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Release X-UI armv7
|
||||
name: Release X-UI
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -10,7 +10,7 @@ jobs:
|
|||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [armv7] # Thêm nền tảng armv7 vào danh sách
|
||||
platform: [amd64, arm64, armv7] # Thêm armv7 vào danh sách
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
@ -27,6 +27,12 @@ jobs:
|
|||
sudo apt-get update
|
||||
sudo apt install gcc-aarch64-linux-gnu
|
||||
|
||||
- name: Install dependencies for armv7 # Thêm bước cài đặt cho armv7
|
||||
if: matrix.platform == 'armv7'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt install gcc-arm-linux-gnueabihf
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go get github.com/shirou/gopsutil/v3/cpu
|
||||
|
@ -36,13 +42,16 @@ jobs:
|
|||
go get github.com/shirou/gopsutil/v3/mem
|
||||
go get github.com/shirou/gopsutil/v3/net
|
||||
|
||||
- name: Build for armv7
|
||||
if: matrix.platform == 'armv7'
|
||||
- name: Build
|
||||
run: |
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=linux
|
||||
export GOARCH=arm
|
||||
export GOARM=7
|
||||
export GOARCH=${{ matrix.platform }}
|
||||
if [ "${{ matrix.platform }}" == "arm64" ]; then
|
||||
export CC=aarch64-linux-gnu-gcc
|
||||
elif [ "${{ matrix.platform }}" == "armv7" ]; then # Thêm điều kiện cho armv7
|
||||
export CC=arm-linux-gnueabihf-gcc
|
||||
fi
|
||||
go build -o xui-release -v main.go
|
||||
|
||||
mkdir x-ui
|
||||
|
@ -54,10 +63,20 @@ jobs:
|
|||
cd x-ui/bin
|
||||
|
||||
# Download dependencies
|
||||
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-32.zip
|
||||
unzip -o Xray-linux-32.zip
|
||||
rm -f Xray-linux-32.zip
|
||||
|
||||
if [ "${{ matrix.platform }}" == "amd64" ]; then
|
||||
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
|
||||
unzip Xray-linux-64.zip
|
||||
rm -f Xray-linux-64.zip
|
||||
elif [ "${{ matrix.platform }}" == "arm64" ]; then
|
||||
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-arm64-v8a.zip
|
||||
unzip Xray-linux-arm64-v8a.zip
|
||||
rm -f Xray-linux-arm64-v8a.zip
|
||||
elif [ "${{ matrix.platform }}" == "armv7" ]; then # Thêm điều kiện cho armv7
|
||||
# Giữ liên kết tải về cho armv7 nguyên thủy
|
||||
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-32.zip
|
||||
unzip Xray-linux-32.zip
|
||||
rm -f Xray-linux-32.zip
|
||||
fi
|
||||
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/geosite.dat
|
||||
|
|
Loading…
Reference in a new issue