forked from ohkami-rs/ohkami
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yaml
180 lines (160 loc) · 5.29 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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
version: '3'
tasks:
CI:
deps:
- test
- check
- bench_dryrun
CI_stable:
deps:
- test
- check
test:
deps:
- test_doc
- test_examples
- test_no_rt
- test_rt_tokio
- test_rt_async-std
- test_rt_smol
- test_rt_glommio
- test_rt_worker
check:
deps:
- check_no_rt
- check_rt_tokio
- check_rt_async-std
- check_rt_smol
- check_rt_glommio
- check_rt_worker
bench_dryrun:
cmds:
- cd benches && cargo bench --features DEBUG --no-run
- cd benches && cargo check
- cd benches_rt/glommio && cargo check
- cd benches_rt/smol && cargo check
- cd benches_rt/tokio && cargo check
- cd benches_rt/vs_actix-web && cargo check
bench:
dir: benches
cmds:
- cargo bench --features DEBUG
#### tests ####
test_doc:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo test --doc --features DEBUG,rt_tokio,sse,ws,{{.MAYBE_NIGHTLY}}
test_examples:
dir: examples
cmds:
- docker compose -f ./realworld/docker-compose.yml up -d
- cd ./realworld && sleep 5 && sqlx migrate run
- cargo test
- docker compose -f ./realworld/docker-compose.yml down
test_no_rt:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo test --lib --features DEBUG,{{.MAYBE_NIGHTLY}}
- cargo test --lib --features DEBUG,sse,ws,{{.MAYBE_NIGHTLY}}
test_rt_tokio:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo test --lib --features rt_tokio,DEBUG,{{.MAYBE_NIGHTLY}}
- cargo test --lib --features rt_tokio,DEBUG,sse,ws,{{.MAYBE_NIGHTLY}}
test_rt_async-std:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo test --lib --features rt_async-std,DEBUG,{{.MAYBE_NIGHTLY}}
- cargo test --lib --features rt_async-std,DEBUG,sse,ws,{{.MAYBE_NIGHTLY}}
test_rt_smol:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo test --lib --features rt_smol,DEBUG,{{.MAYBE_NIGHTLY}}
- cargo test --lib --features rt_smol,DEBUG,sse,ws,{{.MAYBE_NIGHTLY}}
test_rt_glommio:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo test --lib --features rt_glommio,DEBUG,{{.MAYBE_NIGHTLY}}
- cargo test --lib --features rt_glommio,DEBUG,sse,ws,{{.MAYBE_NIGHTLY}}
test_rt_worker:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo test --lib --features rt_worker,DEBUG,{{.MAYBE_NIGHTLY}}
- cargo test --lib --features rt_worker,DEBUG,sse,ws,{{.MAYBE_NIGHTLY}}
#### checks ####
# Assure buildability without "DEBUG" feature
check_no_rt:
vars:
MAYBE_FEATURES_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo '--features nightly' || echo ''
MAYBE_FEATURES_NIGHTLY_full:
sh: cargo version | grep -q 'nightly' && echo '--features nightly,sse,ws' || echo '--features testing'
dir: ohkami
cmds:
- cargo check --lib {{.MAYBE_FEATURES_NIGHTLY}}
- cargo check --lib {{.MAYBE_FEATURES_NIGHTLY_full}}
check_rt_tokio:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo check --lib --features rt_tokio,{{.MAYBE_NIGHTLY}}
- cargo check --lib --features rt_tokio,sse,{{.MAYBE_NIGHTLY}}
- cargo check --lib --features rt_tokio,sse,ws,{{.MAYBE_NIGHTLY}}
check_rt_async-std:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo check --lib --features rt_async-std,{{.MAYBE_NIGHTLY}}
- cargo check --lib --features rt_async-std,sse,{{.MAYBE_NIGHTLY}}
- cargo check --lib --features rt_async-std,sse,ws,{{.MAYBE_NIGHTLY}}
check_rt_smol:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo check --lib --features rt_smol,{{.MAYBE_NIGHTLY}}
- cargo check --lib --features rt_smol,sse,{{.MAYBE_NIGHTLY}}
- cargo check --lib --features rt_smol,sse,ws,{{.MAYBE_NIGHTLY}}
check_rt_glommio:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo check --lib --features rt_glommio,{{.MAYBE_NIGHTLY}}
- cargo check --lib --features rt_glommio,sse,{{.MAYBE_NIGHTLY}}
- cargo check --lib --features rt_glommio,sse,ws,{{.MAYBE_NIGHTLY}}
check_rt_worker:
vars:
MAYBE_NIGHTLY:
sh: cargo version | grep -q 'nightly' && echo 'nightly' || echo ''
dir: ohkami
cmds:
- cargo check --target wasm32-unknown-unknown --lib --features rt_worker,{{.MAYBE_NIGHTLY}}
- cargo check --target wasm32-unknown-unknown --lib --features rt_worker,sse,ws,{{.MAYBE_NIGHTLY}}