-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtaskfile.yaml
44 lines (37 loc) · 1 KB
/
taskfile.yaml
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
version: "3"
includes:
build: "./taskfiles/build.yaml"
deps: "./taskfiles/deps.yaml"
lint: "./taskfiles/lint.yaml"
utils: "tools/yscope-dev-utils/taskfiles/utils.yaml"
vars:
G_BUILD_DIR: "{{.ROOT_DIR}}/build"
G_CPP_SRC_DIR: "{{.ROOT_DIR}}/src"
G_DEPS_DIR: "{{.G_BUILD_DIR}}/deps"
# This should be kept in-sync with its usage in CMakeLists.txt
G_DEPS_CMAKE_SETTINGS_FILE: "{{.G_DEPS_DIR}}/settings.cmake"
G_TEST_BIN_DIR: "{{.G_BUILD_DIR}}/testbin"
G_TEST_TARGET_SUFFIXES:
- "all"
- "containers"
- "error_handling"
tasks:
clean:
desc: "Removes the project build directory."
cmds:
- "rm -rf '{{.G_BUILD_DIR}}'"
init:
internal: true
silent: true
run: "once"
cmds:
- "mkdir -p '{{.G_BUILD_DIR}}'"
test-*:
desc: "Runs unit tests for the specified test target."
vars:
TEST_TARGET: >-
{{printf "unit-test-%s" (index .MATCH 0)}}
deps:
- "build:{{.TEST_TARGET}}"
cmds:
- "{{.G_TEST_BIN_DIR}}/{{.TEST_TARGET}}"