-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
156 lines (142 loc) · 2.97 KB
/
Taskfile.yaml
File metadata and controls
156 lines (142 loc) · 2.97 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
version: "3.44"
vars:
COMPILE_THREADS: 8
TESTS:
- test_uniformgrid
- test_world
- test_multicore
- test_mailboxes
- test_save_manager
- test_simulation
- test_undo_manager
- test_file_dialog
- test_version_tracking
tasks:
premake:
desc: Generate project build files
sources:
- src/**/*.hpp
- src/**/*.cpp
- tests/**/.cpp
- tests/**/.hpp
- premake5.lua
generates:
- build/Makefile
- build/*.make
cmd: premake5 gmake2
embed-static:
internal: true
sources:
- assets/roboto-regular.ttf
generates:
- src/static/roboto_regular.cpp
cmds:
- mkdir -p src/static
- xxd -i assets/roboto-regular.ttf src/static/roboto_regular.cpp
build-binary:
internal: true
requires:
vars:
- CONFIG
- PROJECT
- COMPILE_THREADS
sources:
- src/**/*.hpp
- src/**/*.cpp
- tests/**/.cpp
- tests/**/.hpp
- premake5.lua
- build/Makefile
- build/{{.PROJECT}}.make
generates:
- build/bin/{{.CONFIG}}/{{.PROJECT}}
deps:
- embed-static
- premake
cmds:
- make -C build config={{.CONFIG}} -j{{.COMPILE_THREADS}} {{.PROJECT}}
run-binary:
internal: true
requires:
vars:
- CONFIG
- PROJECT
deps:
- task: build-binary
vars:
CONFIG: "{{.CONFIG}}"
PROJECT: "{{.PROJECT}}"
cmd: build/bin/{{.CONFIG}}/{{.PROJECT}}
build:debug:
desc: Build project (Debug)
cmds:
- task: build-binary
vars:
CONFIG: debug
PROJECT: particles
build:release:
desc: Build project (Release)
aliases:
- build
cmds:
- task: build-binary
vars:
CONFIG: release
PROJECT: particles
build:test:
desc: Build a unit test
requires:
vars: [PROJECT]
cmds:
- task: build-binary
vars:
CONFIG: debug
PROJECT: "{{.PROJECT}}"
build:test:all:
desc: Build all unit tests
cmds:
- for:
var: TESTS
task: build-binary
vars:
CONFIG: debug
PROJECT: "{{.ITEM}}"
run:debug:
desc: Run project
cmds:
- task: run-binary
vars:
CONFIG: debug
PROJECT: particles
run:release:
desc: Run project
aliases:
- run
cmds:
- task: run-binary
vars:
CONFIG: release
PROJECT: particles
test:all:
desc: Build and run all unit tests
deps:
- build:test:all
cmds:
- for:
var: TESTS
task: run-binary
vars:
CONFIG: debug
PROJECT: "{{.ITEM}}"
test:
desc: Build and run a unit test. Use `task test -- test_uniformgrid`
cmds:
- task: run-binary
vars:
CONFIG: debug
PROJECT: "{{index .CLI_ARGS_LIST 0}}"
clean:
desc: Clean builds
cmds:
- rm -fr build
- rm -fr src/static