From 636bbc7c8f88585bc4aa22aabea47373fe92aa59 Mon Sep 17 00:00:00 2001 From: "Lilian A. Moraru" Date: Tue, 19 Dec 2017 01:04:49 +0200 Subject: Speeding CI builds --- .travis.yml | 2 ++ Cargo.toml | 3 +++ appveyor.yml | 29 +++++++++++++++++++++-------- ci/script.sh | 14 ++------------ ignore/Cargo.toml | 3 --- wincolor/src/lib.rs | 3 +++ 6 files changed, 31 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6fa631e7..fd329d75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: rust +cache: cargo env: global: @@ -12,6 +13,7 @@ addons: - zsh matrix: + fast_finish: true include: # Nightly channel. # (All *nix releases are done on the nightly channel to take advantage diff --git a/Cargo.toml b/Cargo.toml index f66cc17b..dcc2227a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,9 @@ name = "rg" name = "integration" path = "tests/tests.rs" +[workspace] +members = [ "grep", "globset", "ignore", "termcolor", "wincolor" ] + [dependencies] atty = "0.2.2" bytecount = "0.2" diff --git a/appveyor.yml b/appveyor.yml index 2aa4c526..6f9d73cb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,20 @@ +# Inspired from https://github.com/habitat-sh/habitat/blob/master/appveyor.yml +cache: + - c:\cargo\registry + - c:\cargo\git + - c:\projects\ripgrep\target + +init: + - mkdir c:\cargo + - mkdir c:\rustup + - SET PATH=c:\cargo\bin;%PATH% + +clone_folder: c:\projects\ripgrep + environment: + CARGO_HOME: "c:\\cargo" + RUSTUP_HOME: "c:\\rustup" + CARGO_TARGET_DIR: "c:\\projects\\ripgrep\\target" global: PROJECT_NAME: ripgrep RUST_BACKTRACE: full @@ -12,12 +28,14 @@ environment: - TARGET: x86_64-pc-windows-msvc CHANNEL: stable +matrix: + fast_finish: true + # Install Rust and Cargo # (Based on from https://github.com/rust-lang/libc/blob/master/appveyor.yml) install: - curl -sSf -o rustup-init.exe https://win.rustup.rs/ - - rustup-init.exe -y --default-host %TARGET% - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin + - rustup-init.exe -y --default-host %TARGET% --no-modify-path - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin - rustc -V - cargo -V @@ -28,12 +46,7 @@ build: false # Equivalent to Travis' `script` phase # TODO modify this phase as you see fit test_script: - - cargo test --verbose - - cargo test --verbose --manifest-path grep/Cargo.toml - - cargo test --verbose --manifest-path globset/Cargo.toml - - cargo test --verbose --manifest-path ignore/Cargo.toml - - cargo test --verbose --manifest-path wincolor/Cargo.toml - - cargo test --verbose --manifest-path termcolor/Cargo.toml + - cargo test --verbose --all before_deploy: # Generate artifacts for release diff --git a/ci/script.sh b/ci/script.sh index 299f562f..32aef003 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -4,9 +4,6 @@ set -ex . $(dirname $0)/utils.sh -# "." - dot is for the current directory(ripgrep itself) -components=( . grep globset ignore termcolor ) - # NOTE Workaround for rust-lang/rust#31907 - disable doc tests when cross compiling # This has been fixed in the nightly channel but it would take a while to reach the other channels disable_cross_doctests() { @@ -18,18 +15,11 @@ disable_cross_doctests() { fi } -run_cargo() { - for component in "${components[@]}"; do - cargo "${1:?}" --target $TARGET --verbose --manifest-path "${component}/Cargo.toml" - done -} - main() { # disable_cross_doctests - run_cargo clean - run_cargo build + cargo build --target "${TARGET}" --verbose --all if [ "$(architecture)" = "amd64" ] || [ "$(architecture)" = "i386" ]; then - run_cargo test + cargo test --target "${TARGET}" --verbose --all "$( dirname "${0}" )/test_complete.sh" fi diff --git a/ignore/Cargo.toml b/ignore/Cargo.toml index 14a07a90..fbdbc5e0 100644 --- a/ignore/Cargo.toml +++ b/ignore/Cargo.toml @@ -33,6 +33,3 @@ tempdir = "0.3.5" [features] simd-accel = ["globset/simd-accel"] - -[profile.release] -debug = true diff --git a/wincolor/src/lib.rs b/wincolor/src/lib.rs index 44c9e410..457f33ae 100644 --- a/wincolor/src/lib.rs +++ b/wincolor/src/lib.rs @@ -8,6 +8,8 @@ Note that on non-Windows platforms, this crate is empty but will compile. # Example ```no_run +# #[cfg(windows)] +# { use wincolor::{Console, Color, Intense}; let mut con = Console::stdout().unwrap(); @@ -15,6 +17,7 @@ con.fg(Intense::Yes, Color::Cyan).unwrap(); println!("This text will be intense cyan."); con.reset().unwrap(); println!("This text will be normal."); +# } ``` */ -- cgit v1.2.3 thod='get' action='/netdata/log/docs/generator/buildyaml.sh'>
path: root/docs/generator/buildyaml.sh
blob: 6fa820b1fa06d6572907223c0bd293a5a4b930ff (plain)
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290