17
17
18
18
name : Rust
19
19
20
+ concurrency :
21
+ group : ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
22
+ cancel-in-progress : true
23
+
20
24
on :
21
25
# always trigger on PR
22
26
push :
32
36
runs-on : ubuntu-latest
33
37
container :
34
38
image : amd64/rust
35
- env :
36
- # Disable full debug symbol generation to speed up CI build and keep memory down
37
- # "1" means line tables only, which is useful for panic tracebacks.
38
- RUSTFLAGS : " -C debuginfo=1"
39
39
steps :
40
40
- uses : actions/checkout@v3
41
41
- name : Cache Cargo
@@ -49,18 +49,17 @@ jobs:
49
49
uses : ./.github/actions/setup-builder
50
50
with :
51
51
rust-version : stable
52
- - name : Check workspace in debug mode
53
- run : |
54
- cargo check
55
- - name : Check workspace in release mode
56
- run : |
57
- cargo check --release
52
+
58
53
- name : Check workspace without default features
59
- run : |
60
- cargo check --no-default-features -p datafusion
54
+ run : cargo check --no-default-features -p datafusion
55
+
56
+ - name : Check workspace in debug mode
57
+ run : cargo check
58
+
59
+ # Note: this does not include dictionary_expressions to reduce codegen
61
60
- name : Check workspace with all features
62
- run : |
63
- cargo check --workspace --benches --features avro,jit,scheduler,json
61
+ run : cargo check --workspace --benches --features avro,jit,scheduler,json
62
+
64
63
- name : Check Cargo.lock for datafusion-cli
65
64
run : |
66
65
# If this test fails, try running `cargo update` in the `datafusion-cli` directory
@@ -70,14 +69,10 @@ jobs:
70
69
# test the crate
71
70
linux-test :
72
71
name : cargo test (amd64)
73
- needs : [linux-build-lib]
72
+ needs : [ linux-build-lib ]
74
73
runs-on : ubuntu-latest
75
74
container :
76
75
image : amd64/rust
77
- env :
78
- # Disable full debug symbol generation to speed up CI build and keep memory down
79
- # "1" means line tables only, which is useful for panic tracebacks.
80
- RUSTFLAGS : " -C debuginfo=1"
81
76
steps :
82
77
- uses : actions/checkout@v3
83
78
with :
@@ -92,17 +87,10 @@ jobs:
92
87
uses : ./.github/actions/setup-builder
93
88
with :
94
89
rust-version : stable
95
- - name : Build tests
96
- run : |
97
- export PATH=$PATH:$HOME/d/protoc/bin
98
- cargo test --features avro,jit,scheduler,json,dictionary_expressions --no-run
99
- - name : Run tests
100
- run : |
101
- export PATH=$PATH:$HOME/d/protoc/bin
102
- cargo test --features avro,jit,scheduler,json,dictionary_expressions
90
+ - name : Run tests (excluding doctests)
91
+ run : cargo test --lib --tests --bins --features avro,jit,scheduler,json,dictionary_expressions
103
92
- name : Run examples
104
93
run : |
105
- export PATH=$PATH:$HOME/d/protoc/bin
106
94
# test datafusion-sql examples
107
95
cargo run --example sql
108
96
# test datafusion-examples
@@ -122,17 +110,34 @@ jobs:
122
110
- name : Verify Working Directory Clean
123
111
run : git diff --exit-code
124
112
113
+ # Run doc tests
114
+ linux-test-doc :
115
+ name : cargo test (amd64)
116
+ needs : [ linux-build-lib ]
117
+ runs-on : ubuntu-latest
118
+ container :
119
+ image : amd64/rust
120
+ steps :
121
+ - uses : actions/checkout@v3
122
+ with :
123
+ submodules : true
124
+ - name : Setup Rust toolchain
125
+ uses : ./.github/actions/setup-builder
126
+ with :
127
+ rust-version : stable
128
+ # Note: this does not include dictionary_expressions to reduce codegen
129
+ - name : Run doctests
130
+ run : cargo test --doc --features avro,jit,scheduler,json
131
+ - name : Verify Working Directory Clean
132
+ run : git diff --exit-code
133
+
125
134
# verify that the benchmark queries return the correct results
126
135
verify-benchmark-results :
127
136
name : verify benchmark results (amd64)
128
- needs : [linux-build-lib]
137
+ needs : [ linux-build-lib ]
129
138
runs-on : ubuntu-latest
130
139
container :
131
140
image : amd64/rust
132
- env :
133
- # Disable full debug symbol generation to speed up CI build and keep memory down
134
- # "1" means line tables only, which is useful for panic tracebacks.
135
- RUSTFLAGS : " -C debuginfo=1"
136
141
steps :
137
142
- uses : actions/checkout@v3
138
143
with :
@@ -166,7 +171,7 @@ jobs:
166
171
167
172
integration-test :
168
173
name : " Compare to postgres"
169
- needs : [linux-build-lib]
174
+ needs : [ linux-build-lib ]
170
175
runs-on : ubuntu-latest
171
176
services :
172
177
postgres :
@@ -230,7 +235,7 @@ jobs:
230
235
231
236
sqllogictest-postgres :
232
237
name : " Run sqllogictest with Postgres runner"
233
- needs : [linux-build-lib]
238
+ needs : [ linux-build-lib ]
234
239
runs-on : ubuntu-latest
235
240
services :
236
241
postgres :
@@ -285,9 +290,7 @@ jobs:
285
290
rustup component add rustfmt
286
291
- name : Run tests
287
292
shell : bash
288
- run : |
289
- export PATH=$PATH:$HOME/d/protoc/bin
290
- cargo test
293
+ run : cargo test
291
294
env :
292
295
# do not produce debug symbols to keep memory usage down
293
296
RUSTFLAGS : " -C debuginfo=0"
@@ -327,14 +330,10 @@ jobs:
327
330
328
331
test-datafusion-pyarrow :
329
332
name : cargo test pyarrow (amd64)
330
- needs : [linux-build-lib]
333
+ needs : [ linux-build-lib ]
331
334
runs-on : ubuntu-20.04
332
335
container :
333
336
image : amd64/rust
334
- env :
335
- # Disable full debug symbol generation to speed up CI build and keep memory down
336
- # "1" means line tables only, which is useful for panic tracebacks.
337
- RUSTFLAGS : " -C debuginfo=1"
338
337
steps :
339
338
- uses : actions/checkout@v3
340
339
with :
@@ -422,14 +421,10 @@ jobs:
422
421
423
422
clippy :
424
423
name : clippy
425
- needs : [linux-build-lib]
424
+ needs : [ linux-build-lib ]
426
425
runs-on : ubuntu-latest
427
426
container :
428
427
image : amd64/rust
429
- env :
430
- # Disable full debug symbol generation to speed up CI build and keep memory down
431
- # "1" means line tables only, which is useful for panic tracebacks.
432
- RUSTFLAGS : " -C debuginfo=1"
433
428
steps :
434
429
- uses : actions/checkout@v3
435
430
with :
@@ -453,14 +448,10 @@ jobs:
453
448
# Check answers are correct when hash values collide
454
449
hash-collisions :
455
450
name : cargo test hash collisions (amd64)
456
- needs : [linux-build-lib]
451
+ needs : [ linux-build-lib ]
457
452
runs-on : ubuntu-latest
458
453
container :
459
454
image : amd64/rust
460
- env :
461
- # Disable full debug symbol generation to speed up CI build and keep memory down
462
- # "1" means line tables only, which is useful for panic tracebacks.
463
- RUSTFLAGS : " -C debuginfo=1"
464
455
steps :
465
456
- uses : actions/checkout@v3
466
457
with :
@@ -483,14 +474,10 @@ jobs:
483
474
484
475
cargo-toml-formatting-checks :
485
476
name : check Cargo.toml formatting
486
- needs : [linux-build-lib]
477
+ needs : [ linux-build-lib ]
487
478
runs-on : ubuntu-latest
488
479
container :
489
480
image : amd64/rust
490
- env :
491
- # Disable full debug symbol generation to speed up CI build and keep memory down
492
- # "1" means line tables only, which is useful for panic tracebacks.
493
- RUSTFLAGS : " -C debuginfo=1"
494
481
steps :
495
482
- uses : actions/checkout@v3
496
483
with :
@@ -506,8 +493,8 @@ jobs:
506
493
with :
507
494
rust-version : stable
508
495
- name : Install cargo-tomlfmt
509
- run : |
510
- which cargo-tomlfmt || cargo install cargo-tomlfmt
496
+ run : which cargo-tomlfmt || cargo install cargo-tomlfmt
497
+
511
498
- name : Check Cargo.toml formatting
512
499
run : |
513
500
# if you encounter error, try rerun the command below, finally run 'git diff' to
@@ -519,14 +506,10 @@ jobs:
519
506
520
507
config-docs-check :
521
508
name : check configs.md is up-to-date
522
- needs : [linux-build-lib]
509
+ needs : [ linux-build-lib ]
523
510
runs-on : ubuntu-latest
524
511
container :
525
512
image : amd64/rust
526
- env :
527
- # Disable full debug symbol generation to speed up CI build and keep memory down
528
- # "1" means line tables only, which is useful for panic tracebacks.
529
- RUSTFLAGS : " -C debuginfo=1"
530
513
steps :
531
514
- uses : actions/checkout@v3
532
515
with :
0 commit comments