fix: lossy truncation in checked Instant
arithmetic
#191
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
name: Rust | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust Nightly | |
run: rustup default nightly | |
- name: Check Formatting | |
run: cargo fmt --all -- --check | |
feature-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust Stable | |
run: rustup default stable | |
- name: Install cargo-hack | |
run: cargo install cargo-hack | |
- name: Check Feature Matrix | |
run: cargo hack build --all --all-targets --feature-powerset | |
test: | |
name: Test ${{ matrix.rust_version }}/${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
rust_version: ['1.70.0', 'stable', 'nightly'] | |
os: [ubuntu-22.04, ubuntu-24.04, macOS-13, macOS-14, windows-2019, windows-2022] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust ${{ matrix.rust_version }} | |
run: rustup default ${{ matrix.rust_version }} | |
- name: Run Tests | |
run: cargo test --no-default-features --features=prost -- --test-threads=1 | |
cross-test: | |
name: Test ${{ matrix.target }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- aarch64-unknown-linux-gnu | |
- armv5te-unknown-linux-gnueabi | |
- arm-unknown-linux-gnueabi | |
- armv7-unknown-linux-gnueabihf | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Ensure Rust up-to-date | |
run: rustup default stable | |
- name: Install Cross | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
- name: Run Tests | |
run: cross test --target ${{ matrix.target }} --no-default-features --features=prost -- --test-threads=1 | |
cross-test-mips-mipssel: | |
name: Test ${{ matrix.target }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- mips-unknown-linux-gnu | |
- mipsel-unknown-linux-gnu | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Ensure Rust up-to-date | |
run: rustup default nightly | |
- name: Install Cross | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
- name: Run Tests | |
run: cross +nightly test --target ${{ matrix.target }} --no-default-features --features=prost -- --test-threads=1 | |
env: | |
RUSTFLAGS: "-C opt-level=1" | |
test-wasm-browser: | |
name: Test ${{ matrix.rust_version }}/${{ matrix.os }} (wasm32-unknown-unknown) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
rust_version: ['1.70.0', 'stable', 'nightly'] | |
os: [ubuntu-22.04, ubuntu-24.04, macOS-13, macOS-14, windows-2019, windows-2022] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust ${{ matrix.rust_version }} | |
run: rustup default ${{ matrix.rust_version }} | |
- name: Install wasm32-unknown-unknown target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Install wasm-pack | |
run: cargo install wasm-pack | |
- name: Run Tests | |
run: wasm-pack test --node | |
test-wasi: | |
name: Test ${{ matrix.rust_version }}/${{ matrix.os }} (wasm32-wasi) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
rust_version: ['1.70.0', 'stable', 'nightly'] | |
os: [ubuntu-22.04, ubuntu-24.04, macOS-13, macOS-14, windows-2019, windows-2022] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust ${{ matrix.rust_version }} | |
run: rustup default ${{ matrix.rust_version }} | |
- name: Install wasm32-wasi target | |
run: rustup target add wasm32-wasi | |
- name: Install cargo-wasi | |
run: cargo install cargo-wasi | |
- name: Install wasmtime | |
run: curl https://wasmtime.dev/install.sh -sSf | bash | |
- name: Run Tests | |
run: cargo wasi test | |
docs: | |
runs-on: ubuntu-latest | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust Nightly | |
run: rustup default nightly | |
- name: Check Docs | |
run: cargo doc --all-features --workspace --no-deps | |
bench: | |
name: Bench ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust Stable | |
run: rustup default stable | |
- name: Run Benchmarks | |
run: cargo bench -- --output-format bencher |