-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
173 lines (145 loc) · 3.83 KB
/
mise.toml
File metadata and controls
173 lines (145 loc) · 3.83 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
[tools]
# Basic technologies used in the repository
python = "3.14.4"
uv = "0.11.8"
# Common tools
"npm:pyright" = "1.1.409"
"pipx:shellcheck-gha" = "0.1.2"
prettier = "3.8.3"
ruff = "0.15.12"
shellcheck = "0.11.0"
shfmt = "3.13.1"
yq = "4.52.5"
[vars]
DEFAULT_YEAR = "{{ get_env(name='YEAR', default='2024') }}"
[tasks."aoc:all"]
description = "Run all solvers"
run = """mise exec -- uv run aoc all "${usage_verbose:-0}" "${usage_dry_run:-false}" "${usage_solver}" """
usage = """
flag "--solver <solver>" {
choices "cpp" "python" "rust"
}
flag "-v --verbose" count=#true var=#true
flag "--dry-run"
"""
dir = "aoc-main"
shell = "sh -c"
[tasks."aoc:one"]
description = "Run solvers for one part"
run = """mise exec -- uv run aoc one "${usage_verbose:-0}" "${usage_dry_run:-false}" "${usage_solver}" "${usage_year:-{{vars.DEFAULT_YEAR}}}" "$usage_day" "$usage_part" """
usage = """
arg "<day>" {
choices "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"
}
arg "<part>" {
choices "1" "2"
}
flag "--solver <solver>" {
choices "cpp" "python" "rust"
}
flag "-y --year <year>"
flag "-v --verbose" count=#true var=#true
flag "--dry-run"
"""
dir = "aoc-main"
shell = "sh -c"
[tasks."aoc:day"]
description = "Run all solvers for one day"
run = """mise exec -- uv run aoc day "${usage_verbose:-0}" "${usage_dry_run:-false}" "${usage_solver}" "${usage_year:-{{vars.DEFAULT_YEAR}}}" "$usage_day" """
usage = """
arg "<day>" {
choices "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"
}
flag "--solver <solver>" {
choices "cpp" "python" "rust"
}
flag "-y --year <year>"
flag "-v --verbose" count=#true var=#true
flag "--dry-run"
"""
dir = "aoc-main"
shell = "sh -c"
[tasks.check]
depends = [
"check:prettier",
"check:pyright-repo",
"check:ruff",
"check:ruff:format",
"check:shellcheck",
"check:shellcheck-gha",
"check:shfmt",
"check:aoc-main",
"check:solver:cpp",
"check:solver:python",
"check:solver:rust",
]
[tasks."check:prettier"]
run = """
set -x
excludesFile=$(git config --get core.excludesFile || true)
if [ -z "$excludesFile" ]; then
if [ -z "$XDG_CONFIG_HOME" ]; then
excludesFile="$HOME/.config/git/ignore"
else
excludesFile="$XDG_CONFIG_HOME/git/ignore"
fi
fi
userIgnoreArg=""
if [ -f "$excludesFile" ]; then
userIgnoreArg="--ignore-path=$excludesFile"
fi
prettier --ignore-path=.gitignore --ignore-path=.prettierignore "$userIgnoreArg" --check .
"""
[tasks."check:pyright-repo"]
run = "pyright"
[tasks."check:ruff"]
run = "ruff check"
[tasks."check:ruff:format"]
run = "ruff format --check"
[tasks."check:shellcheck-gha:actions"]
run = "shellcheck-gha --no-skip-unknown-files .github/actions"
[tasks."check:shellcheck-gha:workflows"]
run = "shellcheck-gha --no-skip-unknown-files .github/workflows"
[tasks."check:shellcheck-gha"]
depends = ["check:shellcheck-gha:actions", "check:shellcheck-gha:workflows"]
[tasks."check:aoc-main"]
run = "mise run check"
dir = "aoc-main"
[tasks."check:solver:cpp"]
run = "mise run check"
dir = "solvers/cpp"
[tasks."check:solver:python"]
run = "mise run check"
dir = "solvers/python"
[tasks."check:solver:rust"]
run = "mise run check"
dir = "solvers/rust"
[tasks.fix]
depends = [
"fix:prettier",
"fix:ruff",
"fix:ruff:format",
"fix:shfmt",
"fix:aoc-main",
"fix:solver:cpp",
"fix:solver:python",
"fix:solver:rust",
]
[tasks."fix:prettier"]
run = "prettier --write --cache-location .prettiercache ."
[tasks."fix:ruff:format"]
run = "ruff format"
[tasks."fix:ruff"]
run = "ruff check --fix-only"
[tasks."fix:aoc-main"]
run = "mise run fix"
dir = "aoc-main"
[tasks."fix:solver:cpp"]
run = "mise run fix"
dir = "solvers/cpp"
[tasks."fix:solver:python"]
run = "mise run fix"
dir = "solvers/python"
[tasks."fix:solver:rust"]
run = "mise run fix"
dir = "solvers/rust"