Fix instances of UB that cause tests to not pass under miri (#878) #183
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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-2022-06-22] | |
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 |