-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Taskfile.yml
90 lines (82 loc) · 2.63 KB
/
Taskfile.yml
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
# https://taskfile.dev/#6/installation
version: 3
includes:
docker: ./docker/Taskfile.yml
examples: ./examples/Taskfile.yml
myproj:
taskfile: ./tests/myproj/Taskfile.yml
dir: ./tests/myproj
install:
taskfile: ./tests/install/Taskfile.yml
dir: ./tests/install
minimal:
taskfile: ./tests/minimal/Taskfile.yml
dir: ./tests/minimal
emscripten:
taskfile: ./tests/emscripten/Taskfile.yml
dir: ./tests/emscripten
rpi3:
taskfile: ./tests/rpi3/Taskfile.yml
dir: ./tests/rpi3
rpi4:
taskfile: ./tests/rpi4/Taskfile.yml
dir: ./tests/rpi4
rpi4-vcpkg:
taskfile: ./tests/rpi4-vcpkg/Taskfile.yml
dir: ./tests/rpi4-vcpkg
docs:
taskfile: ./docs/Taskfile.yml
dir: ./docs
vars:
CWD:
sh: git rev-parse --show-toplevel
tasks:
test:
- task: myproj:test
- task: myproj:test.release
- task: install
lint.cspell: npx -y cspell lint --no-progress --show-suggestions
lint.clang-format:
cmds:
- cmd: powershell -c '$files=(git ls-files --exclude-standard); foreach ($file in $files) { if ((get-item $file).Extension -in ".cpp", ".hpp", ".c", ".cc", ".cxx", ".hxx", ".ixx") { clang-format -i -style=file $file } }'
platforms: [windows]
- cmd: git ls-files --exclude-standard | grep -E '\.(cpp|hpp|c|cc|cxx|hxx|ixx)$' | xargs clang-format -i -style=file
platforms: [linux, darwin]
lint.cmake:
cmds:
- cmd: powershell -c '$files=(git ls-files --exclude-standard); foreach ($file in $files) { $item=(get-item $file); if (($item.Name -eq "CMakeLists.txt") -or ($item.Extension -in ".cmake")) { cmake-format --in-place $file; cmake-lint $file {{.CMAKE_LINT_FLAGS}} } }'
platforms: [windows]
- cmd: git ls-files --exclude-standard | grep -E '(CMakeLists\.txt)|(\.(cmake))$' | xargs cmake-format --in-place | xargs cmake-lint {{.CMAKE_LINT_FLAGS}}
platforms: [linux, darwin]
vars:
CMAKE_LINT_FLAGS: --disabled-codes C0103 C0301 R0912 R0915 R0913 --suppress-decorations
lint:
deps:
- lint.cspell
- lint.clang-format
- lint.cmake
cmds:
- task: myproj:lint
- task: install:lint
- task: minimal:lint
- task: emscripten:lint
- task: rpi4-vcpkg:lint
clean:
deps:
- myproj:clean
- install:clean
- minimal:clean
cmds:
- cmd: powershell -c 'function rmrf($path) { if (test-path $path) { rm -r -force $path }}; rmrf ./install'
platforms: [windows]
- cmd: rm -rf ./install
platforms: [linux, darwin]
docs:
deps:
- docs:docs
docs.preview:
deps:
- docs:docs.preview
docs.deploy:
deps:
- docs:docs.deploy