42
42
# Check crate compiles
43
43
linux-build-lib :
44
44
name : cargo check
45
+ if : (github.event_name == 'push') ||
46
+ (github.event_name == 'pull_request' &&
47
+ github.event.pull_request.head.repo.full_name != github.repository) ||
48
+ (github.event_name == 'workflow_dispatch')
45
49
runs-on : ubuntu-latest
46
50
container :
47
51
image : amd64/rust
@@ -133,6 +137,10 @@ jobs:
133
137
# Run tests
134
138
linux-test :
135
139
name : cargo test (amd64)
140
+ if : (github.event_name == 'push') ||
141
+ (github.event_name == 'pull_request' &&
142
+ github.event.pull_request.head.repo.full_name != github.repository) ||
143
+ (github.event_name == 'workflow_dispatch')
136
144
needs : [ linux-build-lib ]
137
145
runs-on : ubuntu-latest
138
146
container :
@@ -144,14 +152,18 @@ jobs:
144
152
- name : Setup Rust toolchain
145
153
uses : ./.github/actions/setup-builder
146
154
with :
147
- rust-version : stable
155
+ rust-version : stable
148
156
- name : Run tests (excluding doctests)
149
157
run : cargo test --lib --tests --bins --features avro,json,backtrace
150
158
- name : Verify Working Directory Clean
151
159
run : git diff --exit-code
152
160
153
161
linux-test-datafusion-cli :
154
162
name : cargo test datafusion-cli (amd64)
163
+ if : (github.event_name == 'push') ||
164
+ (github.event_name == 'pull_request' &&
165
+ github.event.pull_request.head.repo.full_name != github.repository) ||
166
+ (github.event_name == 'workflow_dispatch')
155
167
needs : [ linux-build-lib ]
156
168
runs-on : ubuntu-latest
157
169
container :
@@ -173,6 +185,10 @@ jobs:
173
185
174
186
linux-test-example :
175
187
name : cargo examples (amd64)
188
+ if : (github.event_name == 'push') ||
189
+ (github.event_name == 'pull_request' &&
190
+ github.event.pull_request.head.repo.full_name != github.repository) ||
191
+ (github.event_name == 'workflow_dispatch')
176
192
needs : [ linux-build-lib ]
177
193
runs-on : ubuntu-latest
178
194
container :
@@ -199,6 +215,10 @@ jobs:
199
215
# Run `cargo test doc` (test documentation examples)
200
216
linux-test-doc :
201
217
name : cargo test doc (amd64)
218
+ if : (github.event_name == 'push') ||
219
+ (github.event_name == 'pull_request' &&
220
+ github.event.pull_request.head.repo.full_name != github.repository) ||
221
+ (github.event_name == 'workflow_dispatch')
202
222
needs : [ linux-build-lib ]
203
223
runs-on : ubuntu-latest
204
224
container :
@@ -222,6 +242,10 @@ jobs:
222
242
# Run `cargo doc` to ensure the rustdoc is clean
223
243
linux-rustdoc :
224
244
name : cargo doc
245
+ if : (github.event_name == 'push') ||
246
+ (github.event_name == 'pull_request' &&
247
+ github.event.pull_request.head.repo.full_name != github.repository) ||
248
+ (github.event_name == 'workflow_dispatch')
225
249
needs : [ linux-build-lib ]
226
250
runs-on : ubuntu-latest
227
251
container :
@@ -237,6 +261,10 @@ jobs:
237
261
238
262
linux-wasm-pack :
239
263
name : build with wasm-pack
264
+ if : (github.event_name == 'push') ||
265
+ (github.event_name == 'pull_request' &&
266
+ github.event.pull_request.head.repo.full_name != github.repository) ||
267
+ (github.event_name == 'workflow_dispatch')
240
268
runs-on : ubuntu-latest
241
269
container :
242
270
image : amd64/rust
@@ -255,6 +283,10 @@ jobs:
255
283
# verify that the benchmark queries return the correct results
256
284
verify-benchmark-results :
257
285
name : verify benchmark results (amd64)
286
+ if : (github.event_name == 'push') ||
287
+ (github.event_name == 'pull_request' &&
288
+ github.event.pull_request.head.repo.full_name != github.repository) ||
289
+ (github.event_name == 'workflow_dispatch')
258
290
needs : [ linux-build-lib ]
259
291
runs-on : ubuntu-latest
260
292
container :
@@ -286,6 +318,10 @@ jobs:
286
318
287
319
sqllogictest-postgres :
288
320
name : " Run sqllogictest with Postgres runner"
321
+ if : (github.event_name == 'push') ||
322
+ (github.event_name == 'pull_request' &&
323
+ github.event.pull_request.head.repo.full_name != github.repository) ||
324
+ (github.event_name == 'workflow_dispatch')
289
325
needs : [ linux-build-lib ]
290
326
runs-on : ubuntu-latest
291
327
services :
@@ -317,6 +353,10 @@ jobs:
317
353
318
354
windows :
319
355
name : cargo test (win64)
356
+ if : (github.event_name == 'push') ||
357
+ (github.event_name == 'pull_request' &&
358
+ github.event.pull_request.head.repo.full_name != github.repository) ||
359
+ (github.event_name == 'workflow_dispatch')
320
360
runs-on : windows-latest
321
361
steps :
322
362
- uses : actions/checkout@v4
@@ -334,22 +374,30 @@ jobs:
334
374
335
375
macos :
336
376
name : cargo test (macos)
377
+ if : (github.event_name == 'push') ||
378
+ (github.event_name == 'pull_request' &&
379
+ github.event.pull_request.head.repo.full_name != github.repository) ||
380
+ (github.event_name == 'workflow_dispatch')
337
381
runs-on : macos-latest
338
382
steps :
339
383
- uses : actions/checkout@v4
340
384
with :
341
- submodules : true
385
+ submodules : true
342
386
- name : Setup Rust toolchain
343
- uses : ./.github/actions/setup-macos-builder
387
+ uses : ./.github/actions/setup-macos-builder
344
388
- name : Run tests (excluding doctests)
345
389
shell : bash
346
390
run : |
347
391
cargo test --lib --tests --bins --features avro,json,backtrace
348
392
cd datafusion-cli
349
- cargo test --lib --tests --bins --all-features
393
+ cargo test --lib --tests --bins --all-features
350
394
351
395
macos-aarch64 :
352
396
name : cargo test (macos-aarch64)
397
+ if : (github.event_name == 'push') ||
398
+ (github.event_name == 'pull_request' &&
399
+ github.event.pull_request.head.repo.full_name != github.repository) ||
400
+ (github.event_name == 'workflow_dispatch')
353
401
runs-on : macos-14
354
402
steps :
355
403
- uses : actions/checkout@v4
@@ -366,6 +414,10 @@ jobs:
366
414
367
415
test-datafusion-pyarrow :
368
416
name : cargo test pyarrow (amd64)
417
+ if : (github.event_name == 'push') ||
418
+ (github.event_name == 'pull_request' &&
419
+ github.event.pull_request.head.repo.full_name != github.repository) ||
420
+ (github.event_name == 'workflow_dispatch')
369
421
needs : [ linux-build-lib ]
370
422
runs-on : ubuntu-20.04
371
423
container :
@@ -390,6 +442,10 @@ jobs:
390
442
391
443
vendor :
392
444
name : Verify Vendored Code
445
+ if : (github.event_name == 'push') ||
446
+ (github.event_name == 'pull_request' &&
447
+ github.event.pull_request.head.repo.full_name != github.repository) ||
448
+ (github.event_name == 'workflow_dispatch')
393
449
runs-on : ubuntu-latest
394
450
container :
395
451
image : amd64/rust
@@ -405,6 +461,10 @@ jobs:
405
461
406
462
check-fmt :
407
463
name : Check cargo fmt
464
+ if : (github.event_name == 'push') ||
465
+ (github.event_name == 'pull_request' &&
466
+ github.event.pull_request.head.repo.full_name != github.repository) ||
467
+ (github.event_name == 'workflow_dispatch')
408
468
runs-on : ubuntu-latest
409
469
container :
410
470
image : amd64/rust
@@ -463,6 +523,10 @@ jobs:
463
523
464
524
clippy :
465
525
name : clippy
526
+ if : (github.event_name == 'push') ||
527
+ (github.event_name == 'pull_request' &&
528
+ github.event.pull_request.head.repo.full_name != github.repository) ||
529
+ (github.event_name == 'workflow_dispatch')
466
530
needs : [ linux-build-lib ]
467
531
runs-on : ubuntu-latest
468
532
container :
@@ -483,6 +547,10 @@ jobs:
483
547
# Check answers are correct when hash values collide
484
548
hash-collisions :
485
549
name : cargo test hash collisions (amd64)
550
+ if : (github.event_name == 'push') ||
551
+ (github.event_name == 'pull_request' &&
552
+ github.event.pull_request.head.repo.full_name != github.repository) ||
553
+ (github.event_name == 'workflow_dispatch')
486
554
needs : [ linux-build-lib ]
487
555
runs-on : ubuntu-latest
488
556
container :
@@ -502,6 +570,10 @@ jobs:
502
570
503
571
cargo-toml-formatting-checks :
504
572
name : check Cargo.toml formatting
573
+ if : (github.event_name == 'push') ||
574
+ (github.event_name == 'pull_request' &&
575
+ github.event.pull_request.head.repo.full_name != github.repository) ||
576
+ (github.event_name == 'workflow_dispatch')
505
577
needs : [ linux-build-lib ]
506
578
runs-on : ubuntu-latest
507
579
container :
@@ -522,6 +594,10 @@ jobs:
522
594
523
595
config-docs-check :
524
596
name : check configs.md is up-to-date
597
+ if : (github.event_name == 'push') ||
598
+ (github.event_name == 'pull_request' &&
599
+ github.event.pull_request.head.repo.full_name != github.repository) ||
600
+ (github.event_name == 'workflow_dispatch')
525
601
needs : [ linux-build-lib ]
526
602
runs-on : ubuntu-latest
527
603
container :
@@ -550,6 +626,10 @@ jobs:
550
626
# - datafusion-cli
551
627
msrv :
552
628
name : Verify MSRV (Min Supported Rust Version)
629
+ if : (github.event_name == 'push') ||
630
+ (github.event_name == 'pull_request' &&
631
+ github.event.pull_request.head.repo.full_name != github.repository) ||
632
+ (github.event_name == 'workflow_dispatch')
553
633
runs-on : ubuntu-latest
554
634
container :
555
635
image : amd64/rust
@@ -567,19 +647,19 @@ jobs:
567
647
# (Min Supported Rust Version) than the one specified in the
568
648
# `rust-version` key of `Cargo.toml`.
569
649
#
570
- # To reproduce:
571
- # 1. Install the version of Rust that is failing. Example:
650
+ # To reproduce:
651
+ # 1. Install the version of Rust that is failing. Example:
572
652
# rustup install 1.76.0
573
653
# 2. Run the command that failed with that version. Example:
574
654
# cargo +1.76.0 check -p datafusion
575
- #
655
+ #
576
656
# To resolve, either:
577
- # 1. Change your code to use older Rust features,
657
+ # 1. Change your code to use older Rust features,
578
658
# 2. Revert dependency update
579
659
# 3. Update the MSRV version in `Cargo.toml`
580
660
#
581
661
# Please see the DataFusion Rust Version Compatibility Policy before
582
- # updating Cargo.toml. You may have to update the code instead.
662
+ # updating Cargo.toml. You may have to update the code instead.
583
663
# https://github.com/apache/datafusion/blob/main/README.md#rust-version-compatibility-policy
584
664
cargo msrv --output-format json --log-target stdout verify
585
665
- name : Check datafusion-substrait
@@ -590,4 +670,4 @@ jobs:
590
670
run : cargo msrv --output-format json --log-target stdout verify
591
671
- name : Check datafusion-cli
592
672
working-directory : datafusion-cli
593
- run : cargo msrv --output-format json --log-target stdout verify
673
+ run : cargo msrv --output-format json --log-target stdout verify
0 commit comments