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 :
@@ -327,14 +332,10 @@ jobs:
327
332
328
333
test-datafusion-pyarrow :
329
334
name : cargo test pyarrow (amd64)
330
- needs : [linux-build-lib]
335
+ needs : [ linux-build-lib ]
331
336
runs-on : ubuntu-20.04
332
337
container :
333
338
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
339
steps :
339
340
- uses : actions/checkout@v3
340
341
with :
@@ -422,14 +423,10 @@ jobs:
422
423
423
424
clippy :
424
425
name : clippy
425
- needs : [linux-build-lib]
426
+ needs : [ linux-build-lib ]
426
427
runs-on : ubuntu-latest
427
428
container :
428
429
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
430
steps :
434
431
- uses : actions/checkout@v3
435
432
with :
@@ -453,14 +450,10 @@ jobs:
453
450
# Check answers are correct when hash values collide
454
451
hash-collisions :
455
452
name : cargo test hash collisions (amd64)
456
- needs : [linux-build-lib]
453
+ needs : [ linux-build-lib ]
457
454
runs-on : ubuntu-latest
458
455
container :
459
456
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
457
steps :
465
458
- uses : actions/checkout@v3
466
459
with :
@@ -483,14 +476,10 @@ jobs:
483
476
484
477
cargo-toml-formatting-checks :
485
478
name : check Cargo.toml formatting
486
- needs : [linux-build-lib]
479
+ needs : [ linux-build-lib ]
487
480
runs-on : ubuntu-latest
488
481
container :
489
482
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
483
steps :
495
484
- uses : actions/checkout@v3
496
485
with :
@@ -506,8 +495,8 @@ jobs:
506
495
with :
507
496
rust-version : stable
508
497
- name : Install cargo-tomlfmt
509
- run : |
510
- which cargo-tomlfmt || cargo install cargo-tomlfmt
498
+ run : which cargo-tomlfmt || cargo install cargo-tomlfmt
499
+
511
500
- name : Check Cargo.toml formatting
512
501
run : |
513
502
# if you encounter error, try rerun the command below, finally run 'git diff' to
@@ -519,14 +508,10 @@ jobs:
519
508
520
509
config-docs-check :
521
510
name : check configs.md is up-to-date
522
- needs : [linux-build-lib]
511
+ needs : [ linux-build-lib ]
523
512
runs-on : ubuntu-latest
524
513
container :
525
514
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
515
steps :
531
516
- uses : actions/checkout@v3
532
517
with :
0 commit comments