Skip to content

Commit c8b66e9

Browse files
authored
deepxctl (#30)
* deepxctl: deepxctl,golang实现,提供统一命令行运维 * /tool/deepxctl
1 parent 5dc03c3 commit c8b66e9

File tree

11 files changed

+47
-4
lines changed

11 files changed

+47
-4
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Tool/deepxctl Build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
strategy:
7+
matrix:
8+
os: [ubuntu-22.04] # 只保留 Ubuntu
9+
go-version: [1.23.2]
10+
runs-on: ${{ matrix.os }}
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
# 系统依赖安装
18+
- name: 安装Go
19+
uses: actions/setup-go@v4
20+
with:
21+
go-version: ${{ matrix.go-version }}
22+
cache: true
23+
24+
# 系统依赖安装
25+
- name: 安装依赖 (Ubuntu)
26+
env:
27+
DEBIAN_FRONTEND: noninteractive
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y git
31+
32+
# 构建deepxctl工具
33+
- name: 构建deepxctl
34+
run: |
35+
cd tool/deepxctl
36+
go build -v -o deepxctl
37+
38+
# 运行测试
39+
- name: 运行测试
40+
run: |
41+
cd tool/deepxctl
42+
./deepxctl
43+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"os"
77

8-
coretensor "github.com/array2d/deepx/deepxctl/tensor"
8+
coretensor "github.com/array2d/deepx/tool/deepxctl/tensor"
99
)
1010

1111
func PrintCmd() {

deepxctl/go.mod renamed to tool/deepxctl/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/array2d/deepx/deepxctl
1+
module github.com/array2d/deepx/tool/deepxctl
22

33
go 1.23.2
44

File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
"path/filepath"
88

9-
"github.com/array2d/deepx/deepxctl/cmd/tensor"
9+
"github.com/array2d/deepx/tool/deepxctl/cmd/tensor"
1010
)
1111

1212
var version = "0.1.0"
@@ -26,7 +26,7 @@ func main() {
2626

2727
if len(os.Args) < 2 {
2828
printUsage()
29-
os.Exit(1)
29+
os.Exit(0)
3030
}
3131

3232
// 获取子命令

0 commit comments

Comments
 (0)