Skip to content

Commit

Permalink
updates and improvements. Disabled intel mac build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Omega359 committed Dec 19, 2024
1 parent 7198a05 commit 29a5202
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 32 deletions.
3 changes: 0 additions & 3 deletions .github/actions/setup-builder/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ inputs:
runs:
using: "composite"
steps:
# this is here so that we don't attempt to cache windows or macos build artifacts
- name: Run rust cache
uses: Swatinem/rust-cache@v2
- name: Install Build Dependencies
shell: bash
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/setup-rust-runtime/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ runs:
steps:
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Run rust cache
uses: Swatinem/rust-cache@v2
- name: Configure runtime env
shell: bash
# do not produce debug symbols to keep memory usage down
Expand Down
41 changes: 21 additions & 20 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jobs:
- name: Run examples
run: |
# test datafusion-sql examples
cargo run --example sql
cargo run --profile ci --example sql
# test datafusion-examples
ci/scripts/rust_example.sh
- name: Verify Working Directory Clean
Expand Down Expand Up @@ -347,25 +347,26 @@ jobs:
# cd datafusion-cli
# cargo test --lib --tests --bins --all-features

macos:
name: cargo test (macos)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
- name: Setup Rust toolchain
uses: ./.github/actions/setup-macos-builder
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run tests (excluding doctests)
shell: bash
run: |
cargo nextest run --hide-progress-bar --no-fail-fast --cargo-profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --workspace --lib --tests --bins --features avro,json,backtrace
cargo test --profile ci --package datafusion-sqllogictest --test sqllogictests
cd datafusion-cli
cargo nextest run --hide-progress-bar --no-fail-fast --cargo-profile ci --lib --tests --bins --all-features
# Commenting out intel mac build as so few users would ever use it
# macos:
# name: cargo test (macos)
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# fetch-depth: 1
# - name: Setup Rust toolchain
# uses: ./.github/actions/setup-macos-builder
# - name: Install nextest
# uses: taiki-e/install-action@nextest
# - name: Run tests (excluding doctests)
# shell: bash
# run: |
# cargo nextest run --hide-progress-bar --no-fail-fast --cargo-profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --workspace --lib --tests --bins --features avro,json,backtrace
# cargo test --profile ci --package datafusion-sqllogictest --test sqllogictests
# cd datafusion-cli
# cargo nextest run --hide-progress-bar --no-fail-fast --cargo-profile ci --lib --tests --bins --all-features

macos-aarch64:
name: cargo test (macos-aarch64)
Expand Down
10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,17 @@ overflow-checks = false
panic = 'unwind'
rpath = false

# ci turns off debug info to allow for smaller binaries making caching more effective
[profile.ci]
inherits = "dev"
debug = 0
strip = "debuginfo"
incremental = false

# ci turns off debug info, etc for dependencies to allow for smaller binaries making caching more effective
[profile.ci.package."*"]
debug = false
debug-assertions = false
strip = "debuginfo"
opt-level = "s"

[workspace.lints.clippy]
# Detects large stack-allocated futures that may cause stack overflow crashes (see threshold in clippy.toml)
large_futures = "warn"
Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/rust_clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
# under the License.

set -ex
cargo clippy --all-targets --workspace --features avro,pyarrow -- -D warnings
cargo clippy --profile ci --all-targets --workspace --features avro,pyarrow -- -D warnings
cd datafusion-cli
cargo clippy --all-targets --all-features -- -D warnings
cargo clippy --profile ci --all-targets --all-features -- -D warnings
10 changes: 7 additions & 3 deletions datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,13 @@ ctor = "0.2.0"
predicates = "3.0"
rstest = "0.22"

# ci turns off debug info to allow for smaller binaries making caching more effective
[profile.ci]
inherits = "dev"
debug = 0
strip = "debuginfo"
incremental = false

# ci turns off debug info, etc for dependencies to allow for smaller binaries making caching more effective
[profile.ci.package."*"]
debug = false
debug-assertions = false
strip = "debuginfo"
opt-level = "s"
2 changes: 1 addition & 1 deletion datafusion/sqllogictest/bin/sqllogictests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ async fn run_tests() -> Result<()> {
m.println(format!("Completed in {}", HumanDuration(start.elapsed())))?;

#[cfg(feature = "postgres")]
if options.postgres_runner {
if options.postgres_runner && !is_pg_uri_set() {
POSTGRES_IN.tx.send(ContainerCommands::Stop).unwrap_or(());
POSTGRES_STOPPED.rx.lock().await.recv().await;
}
Expand Down

0 comments on commit 29a5202

Please sign in to comment.