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 :
@@ -368,11 +369,10 @@ jobs:
368
369
image : amd64/rust
369
370
steps :
370
371
- uses : actions/checkout@v3
371
- - name : Setup toolchain
372
- run : |
373
- rustup toolchain install stable
374
- rustup default stable
375
- rustup component add rustfmt
372
+ - name : Setup Rust toolchain
373
+ uses : ./.github/actions/setup-builder
374
+ with :
375
+ rust-version : stable
376
376
- name : Run
377
377
run : |
378
378
echo '' > datafusion/proto/src/generated/datafusion.rs
@@ -422,14 +422,10 @@ jobs:
422
422
423
423
clippy :
424
424
name : clippy
425
- needs : [linux-build-lib]
425
+ needs : [ linux-build-lib ]
426
426
runs-on : ubuntu-latest
427
427
container :
428
428
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
429
steps :
434
430
- uses : actions/checkout@v3
435
431
with :
@@ -453,14 +449,10 @@ jobs:
453
449
# Check answers are correct when hash values collide
454
450
hash-collisions :
455
451
name : cargo test hash collisions (amd64)
456
- needs : [linux-build-lib]
452
+ needs : [ linux-build-lib ]
457
453
runs-on : ubuntu-latest
458
454
container :
459
455
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
456
steps :
465
457
- uses : actions/checkout@v3
466
458
with :
@@ -483,14 +475,10 @@ jobs:
483
475
484
476
cargo-toml-formatting-checks :
485
477
name : check Cargo.toml formatting
486
- needs : [linux-build-lib]
478
+ needs : [ linux-build-lib ]
487
479
runs-on : ubuntu-latest
488
480
container :
489
481
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
482
steps :
495
483
- uses : actions/checkout@v3
496
484
with :
@@ -506,8 +494,8 @@ jobs:
506
494
with :
507
495
rust-version : stable
508
496
- name : Install cargo-tomlfmt
509
- run : |
510
- which cargo-tomlfmt || cargo install cargo-tomlfmt
497
+ run : which cargo-tomlfmt || cargo install cargo-tomlfmt
498
+
511
499
- name : Check Cargo.toml formatting
512
500
run : |
513
501
# if you encounter error, try rerun the command below, finally run 'git diff' to
@@ -519,14 +507,10 @@ jobs:
519
507
520
508
config-docs-check :
521
509
name : check configs.md is up-to-date
522
- needs : [linux-build-lib]
510
+ needs : [ linux-build-lib ]
523
511
runs-on : ubuntu-latest
524
512
container :
525
513
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
514
steps :
531
515
- uses : actions/checkout@v3
532
516
with :
0 commit comments