Skip to content

Commit bc8bffc

Browse files
committed
Cleanup CI (apache#5040)
1 parent 9f498bb commit bc8bffc

File tree

5 files changed

+63
-109
lines changed

5 files changed

+63
-109
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@ runs:
3636
echo "Installing ${{ inputs.rust-version }}"
3737
rustup toolchain install ${{ inputs.rust-version }}
3838
rustup default ${{ inputs.rust-version }}
39-
rustup component add rustfmt
39+
- name: Disable debuginfo generation
40+
# Disable full debug symbol generation to speed up CI build and keep memory down
41+
# "1" means line tables only, which is useful for panic tracebacks.
42+
shell: bash
43+
run: echo "RUSTFLAGS=-C debuginfo=1" >> $GITHUB_ENV
44+
- name: Enable backtraces
45+
shell: bash
46+
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: 47 additions & 62 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:
@@ -422,14 +423,10 @@ jobs:
422423

423424
clippy:
424425
name: clippy
425-
needs: [linux-build-lib]
426+
needs: [ linux-build-lib ]
426427
runs-on: ubuntu-latest
427428
container:
428429
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"
433430
steps:
434431
- uses: actions/checkout@v3
435432
with:
@@ -453,14 +450,10 @@ jobs:
453450
# Check answers are correct when hash values collide
454451
hash-collisions:
455452
name: cargo test hash collisions (amd64)
456-
needs: [linux-build-lib]
453+
needs: [ linux-build-lib ]
457454
runs-on: ubuntu-latest
458455
container:
459456
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"
464457
steps:
465458
- uses: actions/checkout@v3
466459
with:
@@ -483,14 +476,10 @@ jobs:
483476
484477
cargo-toml-formatting-checks:
485478
name: check Cargo.toml formatting
486-
needs: [linux-build-lib]
479+
needs: [ linux-build-lib ]
487480
runs-on: ubuntu-latest
488481
container:
489482
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"
494483
steps:
495484
- uses: actions/checkout@v3
496485
with:
@@ -506,8 +495,8 @@ jobs:
506495
with:
507496
rust-version: stable
508497
- name: Install cargo-tomlfmt
509-
run: |
510-
which cargo-tomlfmt || cargo install cargo-tomlfmt
498+
run: which cargo-tomlfmt || cargo install cargo-tomlfmt
499+
511500
- name: Check Cargo.toml formatting
512501
run: |
513502
# if you encounter error, try rerun the command below, finally run 'git diff' to
@@ -519,14 +508,10 @@ jobs:
519508
520509
config-docs-check:
521510
name: check configs.md is up-to-date
522-
needs: [linux-build-lib]
511+
needs: [ linux-build-lib ]
523512
runs-on: ubuntu-latest
524513
container:
525514
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"
530515
steps:
531516
- uses: actions/checkout@v3
532517
with:

0 commit comments

Comments
 (0)