-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathTaskfile.yml
More file actions
42 lines (35 loc) · 1.27 KB
/
Taskfile.yml
File metadata and controls
42 lines (35 loc) · 1.27 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
# https://taskfile.dev/#6/installation
version: 3
includes:
myproj:
taskfile: ../myproj/Taskfile.yml
dir: ../myproj
tasks:
build.release:
- cmake . -B ./build -DCMAKE_BUILD_TYPE:STRING=Release -G '{{.CMAKE_GENERATOR | default "Ninja Multi-Config"}}' {{.CMAKE_ARGS}}
- cmake --build ./build --config Release
test.release:
- task: build.release
- cd ./build && ctest -C Release --verbose
install.myproj:
dir: ../myproj
cmds:
- task: myproj:test.release
- cmake --install ./build --config Release --prefix {{.CWD}}/install
- cmd: '{{.CWD}}/install/bin/main.exe'
platforms: [windows]
- cmd: '{{.CWD}}/install/bin/main'
platforms: [linux, darwin]
default:
cmds:
- task: install.myproj
- cmake . -B ./build -DCMAKE_BUILD_TYPE:STRING=Release -G '{{.CMAKE_GENERATOR | default "Ninja Multi-Config"}}' -DCMAKE_PREFIX_PATH:STRING={{.CWD}}/install;
- cmake --build ./build --config Release
- cd ./build && ctest -C Release --verbose
lint:
- ~/vcpkg/vcpkg format-manifest ./vcpkg.json
clean:
- cmd: powershell -c 'function rmrf($path) { if (test-path $path) { rm -r -force $path }}; rmrf ./build'
platforms: [windows]
- cmd: rm -rf ./build
platforms: [linux, darwin]