Skip to content

Commit 4373daf

Browse files
committed
Cleanup CI (#5040)
1 parent 9f498bb commit 4373daf

File tree

5 files changed

+68
-113
lines changed

5 files changed

+68
-113
lines changed

.github/actions/setup-builder/action.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,17 @@ runs:
3232
apt-get install -y protobuf-compiler
3333
- name: Setup Rust toolchain
3434
shell: bash
35+
# rustfmt is needed for the substrait build script
3536
run: |
3637
echo "Installing ${{ inputs.rust-version }}"
3738
rustup toolchain install ${{ inputs.rust-version }}
3839
rustup default ${{ inputs.rust-version }}
3940
rustup component add rustfmt
41+
- name: Disable debuginfo generation
42+
# Disable full debug symbol generation to speed up CI build and keep memory down
43+
# "1" means line tables only, which is useful for panic tracebacks.
44+
shell: bash
45+
run: echo "RUSTFLAGS=-C debuginfo=1" >> $GITHUB_ENV
46+
- name: Enable backtraces
47+
shell: bash
48+
run: echo "RUST_BACKTRACE=1" >> $GITHUB_ENV

.github/workflows/cancel.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/dev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
name: Dev
1919
on: [push, pull_request]
2020

21+
concurrency:
22+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
23+
cancel-in-progress: true
24+
2125
jobs:
2226
rat:
2327
name: Release Audit Tool (RAT)

.github/workflows/dev_pr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717

1818
name: Labeler
1919

20+
concurrency:
21+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
22+
cancel-in-progress: true
23+
2024
on:
2125
pull_request_target:
2226
types:

.github/workflows/rust.yml

Lines changed: 51 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717

1818
name: Rust
1919

20+
concurrency:
21+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
22+
cancel-in-progress: true
23+
2024
on:
2125
# always trigger on PR
2226
push:
@@ -32,10 +36,6 @@ jobs:
3236
runs-on: ubuntu-latest
3337
container:
3438
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"
3939
steps:
4040
- uses: actions/checkout@v3
4141
- name: Cache Cargo
@@ -49,18 +49,17 @@ jobs:
4949
uses: ./.github/actions/setup-builder
5050
with:
5151
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+
5853
- 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
6160
- 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+
6463
- name: Check Cargo.lock for datafusion-cli
6564
run: |
6665
# If this test fails, try running `cargo update` in the `datafusion-cli` directory
@@ -70,14 +69,10 @@ jobs:
7069
# test the crate
7170
linux-test:
7271
name: cargo test (amd64)
73-
needs: [linux-build-lib]
72+
needs: [ linux-build-lib ]
7473
runs-on: ubuntu-latest
7574
container:
7675
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"
8176
steps:
8277
- uses: actions/checkout@v3
8378
with:
@@ -92,17 +87,10 @@ jobs:
9287
uses: ./.github/actions/setup-builder
9388
with:
9489
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
10392
- name: Run examples
10493
run: |
105-
export PATH=$PATH:$HOME/d/protoc/bin
10694
# test datafusion-sql examples
10795
cargo run --example sql
10896
# test datafusion-examples
@@ -122,17 +110,34 @@ jobs:
122110
- name: Verify Working Directory Clean
123111
run: git diff --exit-code
124112

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+
125134
# verify that the benchmark queries return the correct results
126135
verify-benchmark-results:
127136
name: verify benchmark results (amd64)
128-
needs: [linux-build-lib]
137+
needs: [ linux-build-lib ]
129138
runs-on: ubuntu-latest
130139
container:
131140
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"
136141
steps:
137142
- uses: actions/checkout@v3
138143
with:
@@ -166,7 +171,7 @@ jobs:
166171

167172
integration-test:
168173
name: "Compare to postgres"
169-
needs: [linux-build-lib]
174+
needs: [ linux-build-lib ]
170175
runs-on: ubuntu-latest
171176
services:
172177
postgres:
@@ -230,7 +235,7 @@ jobs:
230235

231236
sqllogictest-postgres:
232237
name: "Run sqllogictest with Postgres runner"
233-
needs: [linux-build-lib]
238+
needs: [ linux-build-lib ]
234239
runs-on: ubuntu-latest
235240
services:
236241
postgres:
@@ -327,14 +332,10 @@ jobs:
327332

328333
test-datafusion-pyarrow:
329334
name: cargo test pyarrow (amd64)
330-
needs: [linux-build-lib]
335+
needs: [ linux-build-lib ]
331336
runs-on: ubuntu-20.04
332337
container:
333338
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"
338339
steps:
339340
- uses: actions/checkout@v3
340341
with:
@@ -368,11 +369,10 @@ jobs:
368369
image: amd64/rust
369370
steps:
370371
- 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
376376
- name: Run
377377
run: |
378378
echo '' > datafusion/proto/src/generated/datafusion.rs
@@ -422,14 +422,10 @@ jobs:
422422

423423
clippy:
424424
name: clippy
425-
needs: [linux-build-lib]
425+
needs: [ linux-build-lib ]
426426
runs-on: ubuntu-latest
427427
container:
428428
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"
433429
steps:
434430
- uses: actions/checkout@v3
435431
with:
@@ -453,14 +449,10 @@ jobs:
453449
# Check answers are correct when hash values collide
454450
hash-collisions:
455451
name: cargo test hash collisions (amd64)
456-
needs: [linux-build-lib]
452+
needs: [ linux-build-lib ]
457453
runs-on: ubuntu-latest
458454
container:
459455
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"
464456
steps:
465457
- uses: actions/checkout@v3
466458
with:
@@ -483,14 +475,10 @@ jobs:
483475
484476
cargo-toml-formatting-checks:
485477
name: check Cargo.toml formatting
486-
needs: [linux-build-lib]
478+
needs: [ linux-build-lib ]
487479
runs-on: ubuntu-latest
488480
container:
489481
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"
494482
steps:
495483
- uses: actions/checkout@v3
496484
with:
@@ -506,8 +494,8 @@ jobs:
506494
with:
507495
rust-version: stable
508496
- name: Install cargo-tomlfmt
509-
run: |
510-
which cargo-tomlfmt || cargo install cargo-tomlfmt
497+
run: which cargo-tomlfmt || cargo install cargo-tomlfmt
498+
511499
- name: Check Cargo.toml formatting
512500
run: |
513501
# if you encounter error, try rerun the command below, finally run 'git diff' to
@@ -519,14 +507,10 @@ jobs:
519507
520508
config-docs-check:
521509
name: check configs.md is up-to-date
522-
needs: [linux-build-lib]
510+
needs: [ linux-build-lib ]
523511
runs-on: ubuntu-latest
524512
container:
525513
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"
530514
steps:
531515
- uses: actions/checkout@v3
532516
with:

0 commit comments

Comments
 (0)