Skip to content

Commit 631e0bf

Browse files
committed
Better CI feature checks
1 parent 04d823b commit 631e0bf

File tree

1 file changed

+67
-21
lines changed

1 file changed

+67
-21
lines changed

.github/workflows/rust.yml

Lines changed: 67 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ jobs:
6666
# the changes to `Cargo.lock` after building with the updated manifest.
6767
cargo check --profile ci --workspace --all-targets --features integration-tests --locked
6868
69-
# cargo check common, functions and substrait with no default features
70-
linux-cargo-check-no-default-features:
71-
name: cargo check no default features
69+
# Check datafusion-common features
70+
#
71+
# Ensure via `cargo check` that the crate can be built with a
72+
# subset of the features packages enabled.
73+
linux-datafusion-common-features:
74+
name: cargo check datafusion-common features
7275
needs: linux-build-lib
7376
runs-on: ubuntu-latest
7477
container:
@@ -79,28 +82,63 @@ jobs:
7982
uses: ./.github/actions/setup-builder
8083
with:
8184
rust-version: stable
82-
- name: Check datafusion without default features
83-
# Some of the test binaries require the parquet feature still
84-
#run: cargo check --all-targets --no-default-features -p datafusion
85-
run: cargo check --profile ci --no-default-features -p datafusion
86-
87-
- name: Check datafusion-common without default features
85+
- name: Check datafusion-common (no-default-features)
8886
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-common
87+
# Note: don't check other feature flags as datafusion-common is not typically used standalone
8988

90-
- name: Check datafusion-functions without default features
91-
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-functions
92-
93-
- name: Check datafusion-substrait without default features
89+
# Check datafusion-substrait features
90+
#
91+
# Ensure via `cargo check` that the crate can be built with a
92+
# subset of the features packages enabled.
93+
linux-datafusion-substrait-features:
94+
name: cargo check datafusion-substrait features
95+
needs: linux-build-lib
96+
runs-on: ubuntu-latest
97+
container:
98+
image: amd64/rust
99+
steps:
100+
- uses: actions/checkout@v4
101+
- name: Setup Rust toolchain
102+
uses: ./.github/actions/setup-builder
103+
with:
104+
rust-version: stable
105+
- name: Check datafusion-substrait (no-default-features)
94106
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-substrait
107+
- name: Check datafusion-substrait (physical)
108+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-substrait --features=physical
109+
- name: Check datafusion-substrait (protoc)
110+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-substrait --features=protoc
95111

96-
- name: Check workspace in debug mode
97-
run: cargo check --profile ci --all-targets --workspace
112+
# Check datafusion-proto features
113+
#
114+
# Ensure via `cargo check` that the crate can be built with a
115+
# subset of the features packages enabled.
116+
linux-datafusion-proto-features:
117+
name: cargo check datafusion-proto features
118+
needs: linux-build-lib
119+
runs-on: ubuntu-latest
120+
container:
121+
image: amd64/rust
122+
steps:
123+
- uses: actions/checkout@v4
124+
- name: Setup Rust toolchain
125+
uses: ./.github/actions/setup-builder
126+
with:
127+
rust-version: stable
128+
- name: Check datafusion-proto (no-default-features)
129+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-proto
130+
- name: Check datafusion-proto (json)
131+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-proto --features=json
132+
- name: Check datafusion-proto (parquet)
133+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-proto --features=parquet
134+
- name: Check datafusion-proto (avro)
135+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-proto --features=avro
98136

99-
- name: Check workspace with additional features
100-
run: cargo check --profile ci --workspace --benches --features avro,json,integration-tests
101137

102-
# cargo check datafusion to ensure that the datafusion crate can be built with only a
103-
# subset of the function packages enabled.
138+
# Check datafusion crate features
139+
#
140+
# Ensure via `cargo check` that the crate can be built with a
141+
# subset of the features packages enabled.
104142
linux-cargo-check-datafusion:
105143
name: cargo check datafusion
106144
needs: linux-build-lib
@@ -113,6 +151,9 @@ jobs:
113151
uses: ./.github/actions/setup-builder
114152
with:
115153
rust-version: stable
154+
- name: Check datafusion (no-default-features)
155+
run: cargo check --all-targets --no-default-features -p datafusion
156+
116157
- name: Check datafusion (nested_expressions)
117158
run: cargo check --profile ci --no-default-features --features=nested_expressions -p datafusion
118159

@@ -134,8 +175,10 @@ jobs:
134175
- name: Check datafusion (string_expressions)
135176
run: cargo check --profile ci --no-default-features --features=string_expressions -p datafusion
136177

137-
# cargo check datafusion-functions to ensure that the datafusion-functions crate can be built with
138-
# only a subset of the function packages enabled.
178+
# Check datafusion-functions crate features
179+
#
180+
# Ensure via `cargo check` that the crate can be built with a
181+
# subset of the features packages enabled.
139182
linux-cargo-check-datafusion-functions:
140183
name: cargo check functions
141184
needs: linux-build-lib
@@ -148,6 +191,9 @@ jobs:
148191
uses: ./.github/actions/setup-builder
149192
with:
150193
rust-version: stable
194+
- name: Check datafusion-functions (no-default-features)
195+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-functions
196+
151197
- name: Check datafusion-functions (crypto)
152198
run: cargo check --profile ci --all-targets --no-default-features --features=crypto_expressions -p datafusion-functions
153199

0 commit comments

Comments
 (0)