You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2021/06/09 18:11:48 UTC

[arrow-rs] branch master updated: Reenable MIRI check (#421)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new e1102e7  Reenable MIRI check (#421)
e1102e7 is described below

commit e1102e722a23aa2d85342efee8a10fdaaf6675e0
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Wed Jun 9 14:11:38 2021 -0400

    Reenable MIRI check (#421)
---
 .github/workflows/miri.yaml         | 60 +++++++++++++++++++++++++++++++++++++
 .github/workflows/rust.yml          | 38 -----------------------
 arrow/src/compute/kernels/length.rs |  2 ++
 3 files changed, 62 insertions(+), 38 deletions(-)

diff --git a/.github/workflows/miri.yaml b/.github/workflows/miri.yaml
new file mode 100644
index 0000000..b74170f
--- /dev/null
+++ b/.github/workflows/miri.yaml
@@ -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
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 77c1f0f..34e0449 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -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
diff --git a/arrow/src/compute/kernels/length.rs b/arrow/src/compute/kernels/length.rs
index 9f392e6..1f9b6e5 100644
--- a/arrow/src/compute/kernels/length.rs
+++ b/arrow/src/compute/kernels/length.rs
@@ -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()
@@ -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()