Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Added CI for IO IPC
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Jan 8, 2022
1 parent 6cb96da commit d428806
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,27 @@ jobs:
# --skip io: miri can't handle opening of files, so we skip those
run: cargo miri test --features full -- --skip io::parquet --skip io::ipc

miri-checks-io:
name: MIRI on IO IPC
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true # needed to test IPC, which are located in a submodule
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-12-10
override: true
- uses: Swatinem/rust-cache@v1
with:
key: key1
- name: Install Miri
run: |
rustup component add miri
cargo miri setup
- name: Run
run: MIRIFLAGS="-Zmiri-disable-stacked-borrows -Zmiri-disable-isolation" cargo miri test --tests --features io_ipc,io_ipc_compression,io_json_integration io::ipc

coverage:
name: Coverage
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions src/io/ipc/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ mod tests {

#[cfg(feature = "io_ipc_compression")]
#[test]
#[cfg_attr(miri, ignore)] // ZSTD uses foreign calls that miri does not support
fn round_trip_zstd() {
let data: Vec<u8> = (0..200u8).map(|x| x % 10).collect();
let mut buffer = vec![];
Expand All @@ -79,6 +80,7 @@ mod tests {

#[cfg(feature = "io_ipc_compression")]
#[test]
#[cfg_attr(miri, ignore)] // LZ4 uses foreign calls that miri does not support
fn round_trip_lz4() {
let data: Vec<u8> = (0..200u8).map(|x| x % 10).collect();
let mut buffer = vec![];
Expand Down
2 changes: 2 additions & 0 deletions tests/it/io/ipc/read/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,13 @@ fn read_generated_017_union() -> Result<()> {
}

#[test]
#[cfg_attr(miri, ignore)] // LZ4 uses foreign calls that miri does not support
fn read_generated_200_compression_lz4() -> Result<()> {
test_file("2.0.0-compression", "generated_lz4")
}

#[test]
#[cfg_attr(miri, ignore)] // ZSTD uses foreign calls that miri does not support
fn read_generated_200_compression_zstd() -> Result<()> {
test_file("2.0.0-compression", "generated_zstd")
}
Expand Down

0 comments on commit d428806

Please sign in to comment.