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

Reenable MIRI check on PRs #421

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
60 changes: 60 additions & 0 deletions .github/workflows/miri.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 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.

name: Rust

on:
# always trigger
push:
pull_request:

jobs:

miri-checks:
name: MIRI
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64]
rust: [nightly-2021-03-24]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt clippy miri
- name: Run Miri Checks
env:
RUST_BACKTRACE: full
RUST_LOG: 'trace'
run: |
export MIRIFLAGS="-Zmiri-disable-isolation"
cargo miri setup
cargo clean
# Currently only the arrow crate is tested with miri
# IO related tests and some unsupported tests are skipped
cargo miri test -p arrow -- --skip csv --skip ipc --skip json || true
38 changes: 0 additions & 38 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,44 +230,6 @@ jobs:
export CARGO_TARGET_DIR="/github/home/target"
cargo clippy --all-targets --workspace -- -D warnings -A clippy::redundant_field_names
# MIRI checks are disabled until they runs cleanly:
# https://github.com/apache/arrow-rs/issues/345
#
# miri-checks:
# name: MIRI
# runs-on: ubuntu-latest
# strategy:
# matrix:
# arch: [amd64]
# rust: [nightly-2021-03-24]
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: true
# - uses: actions/cache@v2
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.lock') }}
# - name: Setup Rust toolchain
# run: |
# rustup toolchain install ${{ matrix.rust }}
# rustup default ${{ matrix.rust }}
# rustup component add rustfmt clippy miri
# - name: Run Miri Checks
# env:
# RUST_BACKTRACE: full
# RUST_LOG: 'trace'
# run: |
# export MIRIFLAGS="-Zmiri-disable-isolation"
# cargo miri setup
# cargo clean
# # Currently only the arrow crate is tested with miri
# # IO related tests and some unsupported tests are skipped
# cargo miri test -p arrow -- --skip csv --skip ipc --skip json || true

lint:
name: Lint
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions arrow/src/compute/kernels/length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)] // error: this test uses too much memory to run on CI
fn bit_length_test_string() -> Result<()> {
bit_length_cases()
.into_iter()
Expand All @@ -297,6 +298,7 @@ mod tests {
}

#[test]
#[cfg_attr(miri, ignore)] // error: this test uses too much memory to run on CI
fn bit_length_test_large_string() -> Result<()> {
bit_length_cases()
.into_iter()
Expand Down