strtod 0.2.0

A high precision floating point parser implementation for Rust
Documentation
# This workflow runs checks for unsafe code. In crates that don't have any unsafe code, this can be
# removed. Runs:
# - miri - detects undefined behavior and memory leaks
# - address sanitizer - detects memory errors
# - leak sanitizer - detects memory leaks
# - loom - Permutation testing for concurrent code https://crates.io/crates/loom
# See check.yml for information about how the concurrency cancellation and workflow triggering works
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:
    timeout-minutes: 30
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          submodules: true
          persist-credentials: false
      - name: Install nightly
        uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master
        with:
          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
          # ensure there's a profile.dev section
          if ! grep -qE '^[ \t]*[profile.dev]' Cargo.toml; then
              echo >> Cargo.toml
              echo '[profile.dev]' >> Cargo.toml
          fi
          # remove pre-existing opt-levels in profile.dev
          sed -i '/^\s*\[profile.dev\]/,/^\s*\[/ {/^\s*opt-level/d}' Cargo.toml
          # now set opt-level to 1
          sed -i '/^\s*\[profile.dev\]/a opt-level = 1' Cargo.toml
          cat Cargo.toml
        name: Enable debug symbols
      - name: cargo test -Zsanitizer=address
        # only --lib --tests b/c of https://github.com/rust-lang/rust/issues/53945
        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"
      - name: cargo test -Zsanitizer=leak
        if: always()
        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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          submodules: true
          persist-credentials: false
      - run: |
          echo "NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)" >> $GITHUB_ENV
      - name: Install ${{ env.NIGHTLY }}
        uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master
        with:
          toolchain: ${{ env.NIGHTLY }}
          components: miri
      - name: cargo miri test
        run: cargo miri test
        env:
          MIRIFLAGS: ""

  # https://github.com/marketplace/actions/alls-green#why used for branch protection checks
  safety-check:
    if: always()
    needs:
      - sanitizers
      - miri
    runs-on: ubuntu-latest
    permissions: {}
    steps:
      - name: Decide whether the needed jobs succeeded or failed
        uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1.2.2
        with:
          jobs: ${{ toJSON(needs) }}