mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-03 16:56:18 +00:00
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: Build for ARM32
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04 # Chọn phiên bản Ubuntu tương thích với ARM32-bit
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2.4.3
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '1.16' # Chọn phiên bản Go tương thích
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-arm-linux-gnueabi
|
|
|
|
- name: Get dependencies
|
|
run: |
|
|
go get github.com/shirou/gopsutil/v3/cpu
|
|
go get github.com/shirou/gopsutil/v3/disk
|
|
go get github.com/shirou/gopsutil/v3/host
|
|
go get github.com/shirou/gopsutil/v3/load
|
|
go get github.com/shirou/gopsutil/v3/mem
|
|
go get github.com/shirou/gopsutil/v3/net
|
|
|
|
- name: Build
|
|
run: |
|
|
export CGO_ENABLED=1
|
|
export GOOS=linux
|
|
export GOARCH=arm
|
|
export GOARM=7 # Chọn phiên bản ARM (armv7a)
|
|
export CC=arm-linux-gnueabi-gcc
|
|
go build -o xui-release -v main.go
|
|
|
|
- name: Package
|
|
run: tar -zcvf x-ui-linux-arm.tar.gz xui-release
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: x-ui-linux-arm
|
|
path: x-ui-linux-arm.tar.gz
|