-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change to use resolver v2
, test more feature flag combinations in CI, fix errors (#1630)
#1822
Changes from 6 commits
75f9b49
ac2f0e2
6d953cc
23897c1
457a749
39c4eea
fba5907
b020e6e
ed413af
89c0429
c6cf1c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,31 +108,43 @@ jobs: | |
|
||
# run tests on all workspace members with default feature list | ||
cargo test | ||
|
||
# Switch to arrow crate | ||
cd arrow | ||
# re-run tests on arrow crate to ensure | ||
# all arrays are created correctly | ||
cargo test --features=force_validate | ||
cargo test --features=prettyprint | ||
# run test on arrow crate with minimal set of features | ||
cargo test --no-default-features | ||
|
||
# re-run tests on arrow crate with all supported features | ||
cargo test -p arrow --features=force_validate,prettyprint | ||
|
||
# Test arrow examples | ||
cargo run --example builders | ||
cargo run --example dynamic_types | ||
cargo run --example read_csv | ||
cargo run --example read_csv_infer_schema | ||
cargo check --no-default-features | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I moved the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it would be worth making a separate named run step (as is done https://github.com/apache/arrow-rs/pull/1822/files#diff-73e17259d77e5fbef83b2bdbbe4dc40a912f807472287f7f45b77e0cbf78792dR188)
So when/if this check fails it will be easier to figure out what is wrong There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Working on this, running into nonsense with environment variables and caching |
||
# Test compilation of arrow library crate with different feature combinations | ||
cargo check -p arrow | ||
cargo check -p arrow --no-default-features | ||
|
||
# Test compilation of arrow targets with different feature combinations | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would theoretically be more correct to test each target individually, so that feature resolution is not impacted by other targets, in practice this is probably good enough |
||
cargo check -p arrow --all-targets | ||
cargo check -p arrow --no-default-features --all-targets | ||
cargo check -p arrow --no-default-features --all-targets --features test_utils | ||
|
||
# Switch to parquet crate | ||
cd ../parquet | ||
# re-run tests on parquet crate with async feature enabled | ||
cargo test --features=async | ||
cargo check --no-default-features | ||
# re-run tests on arrow-flight with all features | ||
cargo test -p arrow-flight --all-features | ||
|
||
# Switch to arrow-flight | ||
cd ../arrow-flight | ||
cargo test --features=flight-sql-experimental | ||
cargo check --no-default-features | ||
# re-run tests on parquet crate with all features | ||
cargo test -p parquet --all-features | ||
|
||
# Test compilation of parquet library crate with different feature combinations | ||
cargo check -p parquet | ||
cargo check -p parquet --no-default-features | ||
cargo check -p parquet --no-default-features --features arrow | ||
|
||
# Test compilation of parquet targets with different feature combinations | ||
cargo check -p parquet --all-targets | ||
cargo check -p parquet --no-default-features --all-targets | ||
cargo check -p parquet --no-default-features --features arrow --all-targets | ||
|
||
# Test compilation of parquet_derive macro with different feature combinations | ||
cargo check -p parquet_derive | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be completely honest I'm not sure why we were testing this, parquet_derive doesn't have any dev-dependencies or feature flags, but I guess it can't hurt to be thorough |
||
|
||
# test the --features "simd" of the arrow crate. This requires nightly. | ||
linux-test-simd: | ||
|
@@ -173,12 +185,12 @@ jobs: | |
export CARGO_TARGET_DIR="/github/home/target" | ||
cd arrow | ||
cargo test --features "simd" | ||
- name: Check new project build with simd features | ||
- name: Check compilation with simd features | ||
run: | | ||
export CARGO_HOME="/github/home/.cargo" | ||
export CARGO_TARGET_DIR="/github/home/target" | ||
cd arrow/test/dependency/simd | ||
cargo check | ||
cargo check -p arrow --features simd | ||
cargo check -p arrow --features simd --all-targets | ||
|
||
windows-and-macos: | ||
name: Test on ${{ matrix.os }} Rust ${{ matrix.rust }} | ||
|
@@ -435,54 +447,3 @@ jobs: | |
export CARGO_TARGET_DIR="/github/home/target" | ||
export RUSTDOCFLAGS="-Dwarnings" | ||
cargo doc --document-private-items --no-deps --workspace --all-features | ||
|
||
|
||
# test builds with various feature flag combinations outside the main workspace | ||
default-build: | ||
name: Feature Flag Builds ${{ matrix.rust }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: [amd64] | ||
rust: [stable] | ||
container: | ||
image: ${{ matrix.arch }}/rust | ||
env: | ||
# Disable debug symbol generation to speed up CI build and keep memory down | ||
RUSTFLAGS: "-C debuginfo=0" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache Cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home/.cargo | ||
# this key equals the ones on `linux-build-lib` for re-use | ||
key: cargo-cache3- | ||
- name: Cache Rust dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home/target | ||
# this key equals the ones on `linux-build-lib` for re-use | ||
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache3-${{ matrix.rust }} | ||
- name: Setup Rust toolchain | ||
uses: ./.github/actions/setup-builder | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
- name: Arrow Build with default features | ||
run: | | ||
export CARGO_HOME="/github/home/.cargo" | ||
export CARGO_TARGET_DIR="/github/home/target" | ||
cd arrow/test/dependency/default-features | ||
cargo check | ||
- name: Arrow Build with default-features=false | ||
run: | | ||
export CARGO_HOME="/github/home/.cargo" | ||
export CARGO_TARGET_DIR="/github/home/target" | ||
cd arrow/test/dependency/no-default-features | ||
cargo check | ||
- name: Parquet Derive build with default-features | ||
run: | | ||
export CARGO_HOME="/github/home/.cargo" | ||
export CARGO_TARGET_DIR="/github/home/target" | ||
cd parquet_derive/test/dependency/default-features | ||
cargo check |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merged these two test runs together as I couldn't see an obvious reason to separate them, and this will make CI slightly faster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the original rationale was to try and test without the default features (mostly I think to try and catch build errors, which this PR does in another way)