-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yml
More file actions
103 lines (90 loc) · 2.53 KB
/
taskfile.yml
File metadata and controls
103 lines (90 loc) · 2.53 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
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 "$HOME/.local/share/mise/shims:$HOME/.local/bin:{{.ROOT_DIR}}/.cache/cargo/bin:$PATH" | tr ":" "\n" | grep -v "globalStorage" | paste -sd ":" -'
CARGO_HOME: "{{.ROOT_DIR}}/.cache/cargo"
CARGO_TARGET_DIR: "{{.ROOT_DIR}}/target"
RUSTUP_TOOLCHAIN: nightly
RUSTC_WRAPPER: sccache
RUSTFLAGS: "-Zthreads={{.BUILD_JOBS}}"
CARGO_BUILD_JOBS: "{{.BUILD_JOBS}}"
includes:
cargo:
taskfile: ./taskfiles/cargo.yml
tasks:
default:
desc: "Default task"
cmds:
- task --list
install:
desc: "Install deps"
cmds:
- mise install
- command -v rustup &> /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- |
if ! command -v sccache &> /dev/null; then
if [[ "$(uname)" == "Darwin" ]]; then
brew install sccache
else
sudo apt-get update && sudo apt-get install -y sccache
fi
fi
- cargo install --locked rustlings
- cargo binstall cargo-nextest --secure --no-confirm
status:
- command -v sccache &> /dev/null
- command -v cargo &> /dev/null
- command -v rustlings &> /dev/null
- command -v cargo-nextest &> /dev/null
silent: true
pre-commit:
desc: "Run pre-commit hooks"
cmds:
- prek run --all-files
lint:
desc: "Run linters"
cmds:
- task: cargo:lint
format:
desc: "Run formatters"
cmds:
- task: cargo:format
test:
desc: "Run tests (Rust + Frontend)"
cmds:
- task: cargo:test
build:timings:
desc: "Analyze build performance bottlenecks"
cmds:
- task: cargo:build:timings
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"
- "**/*.toml"
- "**/*.yml"
- "**/*.yaml"
- "**/*.md"
- "**/*.json"
- ".repomix*"
generates:
- repomix-output.md