forked from probablykasper/time-machine-inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yml
More file actions
132 lines (115 loc) · 3.18 KB
/
taskfile.yml
File metadata and controls
132 lines (115 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3.0"
set: ['e', 'u', 'pipefail']
shopt: ['globstar']
dotenv: ['.env']
vars:
# Reserve 2 cores for system, minimum 1 job
BUILD_JOBS: '{{if gt (sub numCPU 2) 0}}{{sub numCPU 2}}{{else}}1{{end}}'
env:
# Strip IDE extension paths (e.g. VS Code globalStorage) from PATH so
# IDE-bundled tools don't shadow project-pinned versions during builds
PATH:
sh: 'echo "$PATH" | tr ":" "\n" | grep -v "globalStorage" | paste -sd ":" -'
RUSTFLAGS: "-Zthreads={{.BUILD_JOBS}}"
CARGO_BUILD_JOBS: "{{.BUILD_JOBS}}"
includes:
deno:
taskfile: ./taskfiles/deno.yml
cargo:
taskfile: ./taskfiles/cargo.yml
tauri:
taskfile: ./taskfiles/tauri.yml
ci:
taskfile: ./taskfiles/ci.yml
tasks:
default:
desc: "Default task"
cmds:
- task --list
pre-commit:
desc: "Run pre-commit hooks"
cmds:
- pre-commit run --all-files
lint:
desc: "Run linters"
cmds:
- task: cargo:lint
- task: deno:lint
format:
desc: "Run formatters"
cmds:
- task: cargo:format
- task: deno:format
test:
desc: "Run Rust tests"
cmds:
- task: cargo:test
build:
desc: "Build Tauri app for current architecture"
cmds:
- task: tauri:build
build:arm64:
desc: "Build Tauri app for Apple Silicon (arm64)"
cmds:
- task: tauri:build:arm64
build:x64:
desc: "Build Tauri app for Intel (x86_64)"
cmds:
- task: tauri:build:x64
build:timings:
desc: "Analyze build performance bottlenecks"
cmds:
- task: cargo:build:timings
profile:
desc: "Show CPU/RAM usage for time-machine-inspector processes"
platforms: [darwin]
cmds:
- |
procs=$(ps aux | grep -E '[t]ime-machine-inspector' || true)
if [ -z "$procs" ]; then
echo "No time-machine-inspector processes found."
exit 0
fi
echo "$procs" | awk '
BEGIN {
printf "%-8s %-30s %6s %6s %10s\n", "PID", "PROCESS", "CPU%", "MEM%", "RSS (MB)"
printf "%-8s %-30s %6s %6s %10s\n", "---", "-------", "----", "----", "--------"
}
{
pid=$2; cpu=$3; mem=$4; rss=$6/1024
cmd=$11; gsub(/.*\//, "", cmd)
printf "%-8s %-30s %6.1f %6.1f %10.1f\n", pid, cmd, cpu, mem, rss
tcpu+=cpu; tmem+=mem; trss+=rss
}
END {
printf "%-8s %-30s %6s %6s %10s\n", "---", "-------", "----", "----", "--------"
printf "%-8s %-30s %6.1f %6.1f %10.1f\n", "", "TOTAL", tcpu, tmem, trss
}
'
silent: true
repomix:
desc: "Create llm snapshot of repo"
preconditions:
- sh: command -v repomix 2>/dev/null
msg: "repomix is not installed. Install with: npm install -g repomix"
cmds:
- |
repomix \
--style markdown \
--compress \
--remove-comments \
--remove-empty-lines \
--truncate-base64
sources:
- "**/*.rs"
- "**/*.js"
- "**/*.ts"
- "**/*.toml"
- "**/*.yml"
- "**/*.yaml"
- "**/*.md"
- "**/*.json"
- ".repomix*"
generates:
- repomix-output.md