This is an automated email from the ASF dual-hosted git repository. mgrigorov pushed a commit to branch branch-1.11 in repository https://gitbox.apache.org/repos/asf/avro.git
commit 355cf468ce37af8e1e97975d6a413633dc1c6837 Author: Martin Grigorov <[email protected]> AuthorDate: Wed Jan 5 10:43:55 2022 +0200 AVRO-3247 Rust: Run MIRI checks (#1390) (cherry picked from commit 87d04ef9065e3ef21f1fb4135c56d3c6500d2530) --- .github/workflows/test-lang-rust-miri.yml | 53 +++++++++++++++++++++++++++++++ lang/rust/src/schema.rs | 1 + 2 files changed, 54 insertions(+) diff --git a/.github/workflows/test-lang-rust-miri.yml b/.github/workflows/test-lang-rust-miri.yml new file mode 100644 index 0000000..a29f192 --- /dev/null +++ b/.github/workflows/test-lang-rust-miri.yml @@ -0,0 +1,53 @@ +# 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 MIRI Check +on: + workflow_dispatch: + push: + branches: [ master ] + pull_request: + branches: [ master ] + paths: + - .github/workflows/test-lang-rust-miri.yml + - lang/rust/** + +defaults: + run: + working-directory: lang/rust + +jobs: + miri_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Rust toolchain + run: | + MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri) + echo "Installing latest nightly with Miri: $MIRI_NIGHTLY" + rustup toolchain install $MIRI_NIGHTLY + rustup default $MIRI_NIGHTLY + rustup component add miri + - name: Run MIRI Checks + env: + RUST_BACKTRACE: full + RUST_LOG: trace + MIRIFLAGS: "-Zmiri-disable-isolation" + run: | + cargo miri setup + cargo clean + cargo miri test --lib diff --git a/lang/rust/src/schema.rs b/lang/rust/src/schema.rs index efafed5..8e15cd4 100644 --- a/lang/rust/src/schema.rs +++ b/lang/rust/src/schema.rs @@ -1291,6 +1291,7 @@ mod tests { } #[test] + #[cfg_attr(miri, ignore)] // Sha256 uses an inline assembly instructions which is not supported by miri fn test_schema_fingerprint() { use crate::rabin::Rabin; use md5::Md5;
