Skip to content
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

Break parquet CI into its own workflow, standardize step names #2190

Merged
merged 7 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions .github/workflows/arrow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Test default features
- name: Test
run: |
cargo test -p arrow
- name: Test all supported features
- name: Test --features=force_validate,prettyprint
run: |
cargo test -p arrow --features=force_validate,prettyprint
- name: Run examples
Expand All @@ -61,7 +61,7 @@ jobs:

# test compilaton features
linux-features:
name: Feature Compatibility
name: Check Compilation
runs-on: ubuntu-latest
container:
image: amd64/rust
Expand All @@ -77,14 +77,23 @@ jobs:
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Test compilation with different features
- name: Check compilation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By breaking each command into its own step it becomes easier to see which check failed on CI. The actual checks run are the same

run: |
cargo check -p arrow
- name: Check compilation --no-default-features
run: |
cargo check -p arrow --no-default-features
- name: Check compilation --all-targets
run: |
cargo check -p arrow --all-targets
- name: Check compilation --no-default-features --all-targets
run: |
cargo check -p arrow --no-default-features --all-targets
- name: Check compilation --no-default-features --all-targets --features test_utils
run: |
cargo check -p arrow --no-default-features --all-targets --features test_utils

# test the --features "simd" of the arrow crate. This requires nightly.
# test the --features "simd" of the arrow crate. This requires nightly Rust.
linux-test-simd:
name: Test SIMD on AMD64 Rust ${{ matrix.rust }}
runs-on: ubuntu-latest
Expand All @@ -102,12 +111,14 @@ jobs:
uses: ./.github/actions/setup-builder
with:
rust-version: nightly
- name: Run tests
- name: Run tests --features "simd"
run: |
cargo test -p arrow --features "simd"
- name: Check compilation with simd features
- name: Check compilation --features "simd"
run: |
cargo check -p arrow --features simd
- name: Check compilation --features simd --all-targets
run: |
cargo check -p arrow --features simd --all-targets


Expand Down Expand Up @@ -158,4 +169,4 @@ jobs:
rustup component add clippy
- name: Run clippy
run: |
cargo clippy -p arrow --features test_common --features prettyprint --features=async --all-targets --workspace -- -D warnings
cargo clippy -p arrow --features test_common --features prettyprint --features=async --all-targets -- -D warnings
22 changes: 20 additions & 2 deletions .github/workflows/arrow_flight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,27 @@ jobs:
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Tests with default features
- name: Test
run: |
cargo test -p arrow-flight
- name: Tests with all features
- name: Test --all-features
run: |
cargo test -p arrow-flight --all-features

clippy:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the workspace clippy check and instead ran clippy on each individual crate

name: Clippy
runs-on: ubuntu-latest
container:
image: amd64/rust
steps:
- uses: actions/checkout@v2
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Setup Clippy
run: |
rustup component add clippy
- name: Run clippy
run: |
cargo clippy -p arrow-flight --all-features -- -D warnings
111 changes: 111 additions & 0 deletions .github/workflows/parquet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
# tests for parquet crate
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests were extracted from rust.yml

name: "parquet"

on:
pull_request:

jobs:
# test the crate
linux-test:
name: Test
runs-on: ubuntu-latest
container:
image: amd64/rust
env:
# Disable full debug symbol generation to speed up CI build and keep memory down
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Test
run: |
cargo test -p parquet
- name: Test --all-features
run: |
cargo test -p parquet --all-features


# test compilaton
linux-features:
name: Check Compilation
runs-on: ubuntu-latest
container:
image: amd64/rust
env:
# Disable full debug symbol generation to speed up CI build and keep memory down
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Check compilation
run: |
cargo check -p parquet
- name: Check compilation --no-default-features
run: |
cargo check -p parquet --no-default-features
- name: Check compilation --no-default-features --features arrow
run: |
cargo check -p parquet --no-default-features --features arrow
- name: Check compilation --no-default-features --all-features
run: |
cargo check -p parquet --all-features
- name: Check compilation --all-targets
run: |
cargo check -p parquet --all-targets
- name: Check compilation --no-default-features --all-targets
run: |
cargo check -p parquet --no-default-features --all-targets
- name: Check compilation --no-default-features --features-arrow --all-targets
run: |
cargo check -p parquet --no-default-features --features arrow --all-targets

clippy:
name: Clippy
runs-on: ubuntu-latest
container:
image: amd64/rust
steps:
- uses: actions/checkout@v2
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Setup Clippy
run: |
rustup component add clippy
- name: Run clippy
run: |
# Only run clippy for the library at this time,
# as there are clippy errors for other targets
cargo clippy -p parquet --all-features --lib -- -D warnings
#cargo clippy -p parquet --all-targets --all-features -- -D warnings
alamb marked this conversation as resolved.
Show resolved Hide resolved
20 changes: 19 additions & 1 deletion .github/workflows/parquet_derive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ jobs:
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Test crate
- name: Test
run: |
cargo test -p parquet_derive

clippy:
name: Clippy
runs-on: ubuntu-latest
container:
image: amd64/rust
steps:
- uses: actions/checkout@v2
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Setup Clippy
run: |
rustup component add clippy
- name: Run clippy
run: |
cargo clippy -p parquet_derive --all-features -- -D warnings
41 changes: 0 additions & 41 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,6 @@ jobs:
# run tests on all workspace members with default feature list
cargo test
- name: Re-run tests on parquet crate with all features
run: |
cargo test -p parquet --all-features
- name: Test compilation of parquet library crate with different feature combinations
run: |
cargo check -p parquet
cargo check -p parquet --no-default-features
cargo check -p parquet --no-default-features --features arrow
cargo check -p parquet --all-features
- name: Test compilation of parquet targets with different feature combinations
run: |
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


windows-and-macos:
Expand All @@ -94,34 +81,6 @@ jobs:
export RUSTFLAGS="-C debuginfo=0"
cargo test

clippy:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each of the individual crate workflows now run clippy so there is no reason to run it in the workspace as well

name: Clippy
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ amd64 ]
rust: [ stable ]
container:
image: ${{ matrix.arch }}/rust
env:
# Disable full debug symbol generation to speed up CI build and keep memory down
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ matrix.rust }}
- name: Setup Clippy
run: |
rustup component add clippy
- name: Run clippy
run: |
cargo clippy --features test_common --features prettyprint --features=async --all-targets --workspace -- -D warnings

check_benches:
name: Check Benchmarks (but don't run them)
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions parquet/src/encodings/rle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ impl RleEncoder {
self.bit_writer.bytes_written()
}

pub fn is_empty(&self) -> bool {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out clippy complains about this in parquet crate, so I fixed it

self.bit_writer.bytes_written() == 0
}

#[inline]
pub fn consume(mut self) -> Result<Vec<u8>> {
self.flush()?;
Expand Down