Skip to content

Commit

Permalink
Only run with --locked in linux-build-lib job of Rust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrobbel committed Feb 5, 2025
1 parent 684c7df commit 9d0d5cb
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 36 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
with:
rust-version: stable
- name: Prepare cargo build
run: cargo check --profile ci --all-targets --locked
run: cargo check --profile ci --all-targets

# Run extended tests (with feature 'extended_tests')
linux-test-extended:
Expand All @@ -65,7 +65,7 @@ jobs:
with:
rust-version: stable
- name: Run tests (excluding doctests)
run: cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --workspace --lib --tests --bins --features avro,json,backtrace,extended_tests --locked
run: cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --workspace --lib --tests --bins --features avro,json,backtrace,extended_tests
- name: Verify Working Directory Clean
run: git diff --exit-code

Expand All @@ -87,7 +87,7 @@ jobs:
- name: Run tests
run: |
cd datafusion
cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --workspace --lib --tests --features=force_hash_collisions,avro,extended_tests --locked
cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --workspace --lib --tests --features=force_hash_collisions,avro,extended_tests
sqllogictest-sqlite:
name: "Run sqllogictests with the sqlite test suite"
Expand All @@ -104,4 +104,4 @@ jobs:
with:
rust-version: stable
- name: Run sqllogictest
run: cargo test --profile release-nonlto --test sqllogictests --locked -- --include-sqlite
run: cargo test --profile release-nonlto --test sqllogictests -- --include-sqlite
56 changes: 28 additions & 28 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
with:
rust-version: stable
- name: Prepare cargo build
run: cargo check --profile ci --all-targets --features integration-tests --locked
run: cargo check --profile ci --workspace --all-targets --features integration-tests --locked

# cargo check common, functions and substrait with no default features
linux-cargo-check-no-default-features:
Expand All @@ -78,22 +78,22 @@ jobs:
- name: Check datafusion without default features
# Some of the test binaries require the parquet feature still
#run: cargo check --all-targets --no-default-features -p datafusion
run: cargo check --profile ci --no-default-features -p datafusion --locked
run: cargo check --profile ci --no-default-features -p datafusion

- name: Check datafusion-common without default features
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-common --locked
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-common

- name: Check datafusion-functions without default features
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-functions --locked
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-functions

- name: Check datafusion-substrait without default features
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-substrait --locked
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-substrait

- name: Check workspace in debug mode
run: cargo check --profile ci --all-targets --workspace --locked
run: cargo check --profile ci --all-targets --workspace

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

# cargo check datafusion to ensure that the datafusion crate can be built with only a
# subset of the function packages enabled.
Expand All @@ -110,25 +110,25 @@ jobs:
with:
rust-version: stable
- name: Check datafusion (nested_expressions)
run: cargo check --profile ci --no-default-features --features=nested_expressions -p datafusion --locked
run: cargo check --profile ci --no-default-features --features=nested_expressions -p datafusion

- name: Check datafusion (crypto)
run: cargo check --profile ci --no-default-features --features=crypto_expressions -p datafusion --locked
run: cargo check --profile ci --no-default-features --features=crypto_expressions -p datafusion

- name: Check datafusion (datetime_expressions)
run: cargo check --profile ci --no-default-features --features=datetime_expressions -p datafusion --locked
run: cargo check --profile ci --no-default-features --features=datetime_expressions -p datafusion

- name: Check datafusion (encoding_expressions)
run: cargo check --profile ci --no-default-features --features=encoding_expressions -p datafusion --locked
run: cargo check --profile ci --no-default-features --features=encoding_expressions -p datafusion

- name: Check datafusion (math_expressions)
run: cargo check --profile ci --no-default-features --features=math_expressions -p datafusion --locked
run: cargo check --profile ci --no-default-features --features=math_expressions -p datafusion

- name: Check datafusion (regex_expressions)
run: cargo check --profile ci --no-default-features --features=regex_expressions -p datafusion --locked
run: cargo check --profile ci --no-default-features --features=regex_expressions -p datafusion

- name: Check datafusion (string_expressions)
run: cargo check --profile ci --no-default-features --features=string_expressions -p datafusion --locked
run: cargo check --profile ci --no-default-features --features=string_expressions -p datafusion

# cargo check datafusion-functions to ensure that the datafusion-functions crate can be built with
# only a subset of the function packages enabled.
Expand All @@ -145,22 +145,22 @@ jobs:
with:
rust-version: stable
- name: Check datafusion-functions (crypto)
run: cargo check --profile ci --all-targets --no-default-features --features=crypto_expressions -p datafusion-functions --locked
run: cargo check --profile ci --all-targets --no-default-features --features=crypto_expressions -p datafusion-functions

- name: Check datafusion-functions (datetime_expressions)
run: cargo check --profile ci --all-targets --no-default-features --features=datetime_expressions -p datafusion-functions --locked
run: cargo check --profile ci --all-targets --no-default-features --features=datetime_expressions -p datafusion-functions

- name: Check datafusion-functions (encoding_expressions)
run: cargo check --profile ci --all-targets --no-default-features --features=encoding_expressions -p datafusion-functions --locked
run: cargo check --profile ci --all-targets --no-default-features --features=encoding_expressions -p datafusion-functions

- name: Check datafusion-functions (math_expressions)
run: cargo check --profile ci --all-targets --no-default-features --features=math_expressions -p datafusion-functions --locked
run: cargo check --profile ci --all-targets --no-default-features --features=math_expressions -p datafusion-functions

- name: Check datafusion-functions (regex_expressions)
run: cargo check --profile ci --all-targets --no-default-features --features=regex_expressions -p datafusion-functions --locked
run: cargo check --profile ci --all-targets --no-default-features --features=regex_expressions -p datafusion-functions

- name: Check datafusion-functions (string_expressions)
run: cargo check --profile ci --all-targets --no-default-features --features=string_expressions -p datafusion-functions --locked
run: cargo check --profile ci --all-targets --no-default-features --features=string_expressions -p datafusion-functions

# Run tests
linux-test:
Expand All @@ -179,7 +179,7 @@ jobs:
with:
rust-version: stable
- name: Run tests (excluding doctests)
run: cargo test --profile ci --exclude datafusion-examples --exclude ffi_example_table_provider --exclude datafusion-benchmarks --workspace --lib --tests --bins --features avro,json,backtrace,integration-tests --locked
run: cargo test --profile ci --exclude datafusion-examples --exclude ffi_example_table_provider --exclude datafusion-benchmarks --workspace --lib --tests --bins --features avro,json,backtrace,integration-tests
- name: Verify Working Directory Clean
run: git diff --exit-code

Expand All @@ -201,7 +201,7 @@ jobs:
- name: Run examples
run: |
# test datafusion-sql examples
cargo run --profile ci --example sql --locked
cargo run --profile ci --example sql
# test datafusion-examples
ci/scripts/rust_example.sh
- name: Verify Working Directory Clean
Expand All @@ -224,7 +224,7 @@ jobs:
with:
rust-version: stable
- name: Run doctests
run: cargo test --profile ci --doc --features avro,json --locked
run: cargo test --profile ci --doc --features avro,json
- name: Verify Working Directory Clean
run: git diff --exit-code

Expand Down Expand Up @@ -290,8 +290,8 @@ jobs:
# increase stack size to fix stack overflow
export RUST_MIN_STACK=20971520
export TPCH_DATA=`realpath datafusion/sqllogictest/test_files/tpch/data`
cargo test plan_q --package datafusion-benchmarks --profile ci --features=ci --locked -- --test-threads=1
INCLUDE_TPCH=true cargo test --profile ci --package datafusion-sqllogictest --test sqllogictests --locked
cargo test plan_q --package datafusion-benchmarks --profile ci --features=ci -- --test-threads=1
INCLUDE_TPCH=true cargo test --profile ci --package datafusion-sqllogictest --test sqllogictests
- name: Verify Working Directory Clean
run: git diff --exit-code

Expand Down Expand Up @@ -327,7 +327,7 @@ jobs:
- name: Run sqllogictest
run: |
cd datafusion/sqllogictest
PG_COMPAT=true PG_URI="postgresql://postgres:postgres@$POSTGRES_HOST:$POSTGRES_PORT/db_test" cargo test --profile ci --features=postgres --test sqllogictests --locked
PG_COMPAT=true PG_URI="postgresql://postgres:postgres@$POSTGRES_HOST:$POSTGRES_PORT/db_test" cargo test --profile ci --features=postgres --test sqllogictests
env:
# use postgres for the host here because we have specified a container for the job
POSTGRES_HOST: postgres
Expand Down Expand Up @@ -380,7 +380,7 @@ jobs:
uses: ./.github/actions/setup-macos-aarch64-builder
- name: Run tests (excluding doctests)
shell: bash
run: cargo test --profile ci --lib --tests --bins --features avro,json,backtrace,integration-tests --locked
run: cargo test --profile ci --lib --tests --bins --features avro,json,backtrace,integration-tests

test-datafusion-pyarrow:
name: cargo test pyarrow (amd64)
Expand All @@ -405,7 +405,7 @@ jobs:
with:
rust-version: stable
- name: Run datafusion-common tests
run: cargo test --profile ci -p datafusion-common --features=pyarrow --locked
run: cargo test --profile ci -p datafusion-common --features=pyarrow

vendor:
name: Verify Vendored Code
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/rust_clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
# under the License.

set -ex
cargo clippy --all-targets --workspace --features avro,pyarrow,integration-tests --locked -- -D warnings
cargo clippy --all-targets --workspace --features avro,pyarrow,integration-tests -- -D warnings
2 changes: 1 addition & 1 deletion ci/scripts/rust_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

set -ex
export RUSTDOCFLAGS="-D warnings"
cargo doc --document-private-items --no-deps --workspace --locked
cargo doc --document-private-items --no-deps --workspace
4 changes: 2 additions & 2 deletions ci/scripts/rust_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ export CARGO_PROFILE_CI_OPT_LEVEL="s"
export CARGO_PROFILE_CI_STRIP=true

cd datafusion-examples/examples/
cargo build --profile ci --examples --locked
cargo build --profile ci --examples

files=$(ls .)
for filename in $files
do
example_name=`basename $filename ".rs"`
# Skip tests that rely on external storage and flight
if [ ! -d $filename ]; then
cargo run --profile ci --example $example_name --locked
cargo run --profile ci --example $example_name
fi
done

0 comments on commit 9d0d5cb

Please sign in to comment.