refactor: introduce Instant::elapsed_secs_f64
#738
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -Dwarnings | |
| RUSTDOCFLAGS: -Dwarnings | |
| MIRIFLAGS: -Zmiri-strict-provenance | |
| RUST_BACKTRACE: 1 | |
| RUST_LOG: elfo | |
| MSRV: 1.84.0 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: rustup show active-toolchain -v | |
| - run: cargo build --all-targets --all-features | |
| msrv: | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTFLAGS: "" # remove -Dwarnings | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: rustup toolchain install ${{ env.MSRV }} --profile minimal | |
| - run: rustup override set ${{ env.MSRV }} | |
| - run: rustup show active-toolchain -v | |
| - run: cargo build | |
| - run: cargo build --all-features | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: rustup show active-toolchain -v | |
| - run: rustup component add rustfmt | |
| - run: cargo fmt --version | |
| - run: cargo fmt -- --check | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: rustup show active-toolchain -v | |
| - run: rustup component add clippy | |
| - run: cargo clippy --version | |
| - run: cargo clippy | |
| - run: cargo clippy --all-targets --all-features | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: taiki-e/install-action@cargo-llvm-cov | |
| - run: rustup show active-toolchain -v | |
| - run: cargo llvm-cov test --no-report | |
| - run: cargo llvm-cov test --all-features --no-report | |
| - run: cargo llvm-cov report --codecov --output-path codecov.json | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| files: codecov.json | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: elfo-rs/elfo | |
| fail_ci_if_error: true | |
| miri: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: rustup toolchain install nightly --component miri | |
| - run: rustup override set nightly | |
| - run: rustup show active-toolchain -v | |
| - run: cargo miri setup | |
| - run: cargo miri test -p elfo-core --all-features -- _miri | |
| docs: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTDOCFLAGS: -Dwarnings --cfg docsrs | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: rustup toolchain install nightly | |
| - run: rustup override set nightly | |
| - run: rustup show active-toolchain -v | |
| - run: cargo doc --all-features |