-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
99 lines (83 loc) · 1.78 KB
/
Copy pathTaskfile.yml
File metadata and controls
99 lines (83 loc) · 1.78 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
---
version: "3"
# silent: true
includes:
c: https://raw.githubusercontent.com/standardloop/taskfiles/refs/heads/main/c.yml # can pin in future
# c: ../taskfiles/c.yml
vars:
SOURCE_FILES:
- json.c
- lexer.c
- parser.c
TEST_EXECUTABLE_NAME: test
TEST_SOURCE_FILES:
- json.test.c
- lexer.test.c
- parser.test.c
DYLIB_NAME: libstandardloop-json.dylib
DYLIB_HEADER: json.h
DYN_LIBS_USED: "-lstandardloop-util -lstandardloop-collections"
tasks:
default:
cmds:
- task: test:build
# GH_RELEASE_VERSION is set by CI
release:
deps:
- dependencies
cmds:
- task: c:release
dependencies:
cmds:
- task: c:dependencies:util
- task: c:dependencies:collections
test:
deps:
- test:run
sanitize:
deps:
- test:run-sanitize
test:build-sanitize:
deps:
- dependencies
- c:dependencies:testing
cmds:
- task: c:test:build-sanitize
test:run-sanitize:
deps:
- test:build-sanitize
cmds:
- ./{{.TEST_EXECUTABLE_NAME}}-sanitize
test:build:
deps:
- dependencies
- c:dependencies:testing
cmds:
- task: c:test:build
test:run:
deps:
- test:build
cmds:
- ./{{.TEST_EXECUTABLE_NAME}}
clean:
deps:
- c:test:clean
fmt:
deps:
- c:fmt
docs:
silent: true
cmds:
- task: c:docs
test:leaks:
aliases:
- leaks
desc: "Run macOS leaks on the test program."
deps:
- test:build
cmds:
- cp /usr/local/lib/standardloop/libstandardloop-util.dylib ./
- cp /usr/local/lib/standardloop/libstandardloop-collections.dylib ./
- leaks --atExit -- ./{{.TEST_EXECUTABLE_NAME}}
- rm libstandardloop-util.dylib
- rm libstandardloop-collections.dylib