Skip to content

add serde serialization support (#210) #222

add serde serialization support (#210)

add serde serialization support (#210) #222

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build:
strategy:
matrix:
rust_channel: ["stable", "beta", "nightly", "1.73.0"]
feature_set: ["--features collections,boxed"]
include:
- rust_channel: "nightly"
feature_set: "--all-features"
- rust_channel: "stable"
feature_set: "--no-default-features"
exclude:
- rust_channel: "nightly"
feature_set: "--features collections,boxed"
runs-on: ubuntu-latest
steps:
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: Install rust channel
run: rustup install ${{matrix.rust_channel}} && rustup default ${{matrix.rust_channel}}
- uses: actions/checkout@v4
- name: Run tests (no features)
run: cargo test --verbose
- name: Run tests (features)
run: cargo test --verbose ${{matrix.feature_set}}
miri:
runs-on: ubuntu-latest
env:
MIRIFLAGS: "-Zmiri-strict-provenance -Zmiri-ignore-leaks"
steps:
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly -y
- name: Install miri
run: rustup toolchain install nightly --allow-downgrade --profile minimal --component miri
- uses: actions/checkout@v4
- name: Run miri
run: cargo miri test --all-features
valgrind:
runs-on: ubuntu-latest
env:
# Don't leak-check, as Rust globals tend to cause false positives.
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --suppressions=valgrind.supp --leak-check=no --error-exitcode=1 --gen-suppressions=all"
steps:
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: Install rust stable
run: rustup install stable && rustup default stable
- name: Install valgrind
run: sudo apt update && sudo apt install valgrind
- uses: actions/checkout@v4
- name: Test under valgrind (no features)
run: cargo test --verbose
- name: Test under valgrind (features)
run: cargo test --verbose --features collections,boxed
benches:
runs-on: ubuntu-latest
steps:
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: Install rust nightly
run: rustup install nightly && rustup default nightly
- uses: actions/checkout@v4
- name: Check that benches build
run: cargo check --benches --all-features