Moved unsafe from Iban::rand
to util::StrExt::copy_from_str
#70
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
permissions: | |
contents: read | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
name: safety | |
jobs: | |
sanitizers: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: dtolnay/rust-toolchain@nightly | |
- run: | | |
# to get the symbolizer for debug symbol resolution | |
sudo apt install llvm | |
# to fix buggy leak analyzer: | |
# https://github.com/japaric/rust-san#unrealiable-leaksanitizer | |
sed -i '/\[features\]/i [profile.dev]' Cargo.toml | |
sed -i '/profile.dev/a opt-level = 1' Cargo.toml | |
cat Cargo.toml | |
- run: cargo test --lib --tests --all-features --target x86_64-unknown-linux-gnu | |
env: | |
ASAN_OPTIONS: "detect_odr_violation=0:detect_leaks=0" | |
RUSTFLAGS: "-Z sanitizer=address" | |
- run: cargo test --all-features --target x86_64-unknown-linux-gnu | |
env: | |
LSAN_OPTIONS: "suppressions=lsan-suppressions.txt" | |
RUSTFLAGS: "-Z sanitizer=leak" | |
miri: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- run: | | |
echo "NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)" >> $GITHUB_ENV | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.NIGHTLY }} | |
components: miri | |
- run: cargo miri test | |
env: | |
MIRIFLAGS: "" |