Skip to content

Commit

Permalink
Merge 65db5ad into f1fb2b1
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jul 9, 2021
2 parents f1fb2b1 + 65db5ad commit c1b5fa6
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ jobs:
rustup component add rustfmt
- name: Run
run: cargo fmt --all -- --check

coverage:
name: Coverage
runs-on: ubuntu-latest
Expand Down Expand Up @@ -327,9 +328,9 @@ jobs:
cd arrow
cargo build --target wasm32-unknown-unknown
# test the projects can build without default features
# test builds with various feature flags
default-build:
name: Check No Defaults on AMD64 Rust ${{ matrix.rust }}
name: Arrow Feature Flag Builds ${{ matrix.rust }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -338,15 +339,10 @@ jobs:
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"
ARROW_TEST_DATA: /__w/arrow-rs/arrow-rs/testing/data
PARQUET_TEST_DATA: /__w/arrow/arrow/parquet-testing/data
# Disable debug symbol generation to speed up CI build and keep memory down
RUSTFLAGS: "-C debuginfo=0"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v2
with:
Expand All @@ -357,15 +353,22 @@ jobs:
uses: actions/cache@v2
with:
path: /github/home/target
key: ${{ runner.os }}-${{ matrix.arch }}-target-wasm32-cache-${{ matrix.rust }}
# this key equals the ones on `linux-build-lib` for re-use
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup override set ${{ matrix.rust }}
rustup component add rustfmt
- name: Build arrow crate
- name: Build with default features
run: |
export CARGO_HOME="/github/home/.cargo"
export CARGO_TARGET_DIR="/github/home/target"
cd arrow
cargo check --all-targets --no-default-features
cd arrow/test/dependency/default-features
cargo check
- name: 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
21 changes: 21 additions & 0 deletions arrow/test/dependency/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!---
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.
-->

This directory contains projects that use arrow as a dependency with
various combinations of feature flags.
32 changes: 32 additions & 0 deletions arrow/test/dependency/default-features/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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.

[package]
name = "defeault-features"
description = "Models a user application of arrow that uses default features of arrow"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
arrow = { path = "../../../../arrow", version = "5.0.0-SNAPSHOT" }

# Workaround for https://github.com/apache/arrow-rs/issues/529
rand = { version = "0.8" }

[workspace]
3 changes: 3 additions & 0 deletions arrow/test/dependency/default-features/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
32 changes: 32 additions & 0 deletions arrow/test/dependency/no-default-features/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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.

[package]
name = "no-default-features"
description = "Models a user application of arrow that specifies no-default-features=true"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
arrow = { path = "../../../../arrow", version = "5.0.0-SNAPSHOT", default-features = false }

# Workaround for https://github.com/apache/arrow-rs/issues/529
rand = { version = "0.8" }

[workspace]
3 changes: 3 additions & 0 deletions arrow/test/dependency/no-default-features/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
1 change: 1 addition & 0 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ testing/*
target/*
dev/release/rat_exclude_files.txt
arrow/test/data/*
arrow/test/dependency/*
.gitattributes
**.gitignore
.gitmodules
Expand Down

0 comments on commit c1b5fa6

Please sign in to comment.