diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-02 18:36:06 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-02 18:36:06 -0600 |
| commit | 8cdfa445d6629ffef4cb84967ff7017654045bc2 (patch) | |
| tree | 22f0b0907c024c78d26a731e2e1f5219407d8102 /vendor/bytes/ci | |
| parent | 4351c74c7c5f97156bc94d3a8549b9940ac80e3f (diff) | |
chore: add vendor directory
Diffstat (limited to 'vendor/bytes/ci')
| -rwxr-xr-x | vendor/bytes/ci/miri.sh | 10 | ||||
| -rwxr-xr-x | vendor/bytes/ci/panic-abort.sh | 4 | ||||
| -rwxr-xr-x | vendor/bytes/ci/test-stable.sh | 25 | ||||
| -rwxr-xr-x | vendor/bytes/ci/tsan.sh | 13 |
4 files changed, 52 insertions, 0 deletions
diff --git a/vendor/bytes/ci/miri.sh b/vendor/bytes/ci/miri.sh new file mode 100755 index 00000000..7df29f36 --- /dev/null +++ b/vendor/bytes/ci/miri.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +rustup component add miri +cargo miri setup + +export MIRIFLAGS="-Zmiri-strict-provenance" + +cargo miri test +cargo miri test --target mips64-unknown-linux-gnuabi64 diff --git a/vendor/bytes/ci/panic-abort.sh b/vendor/bytes/ci/panic-abort.sh new file mode 100755 index 00000000..4284791f --- /dev/null +++ b/vendor/bytes/ci/panic-abort.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +set -ex +RUSTFLAGS="$RUSTFLAGS -Cpanic=abort -Zpanic-abort-tests" cargo test --all-features --test '*' diff --git a/vendor/bytes/ci/test-stable.sh b/vendor/bytes/ci/test-stable.sh new file mode 100755 index 00000000..ad975744 --- /dev/null +++ b/vendor/bytes/ci/test-stable.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -ex + +cmd="${1:-test}" + +# Run with each feature +# * --each-feature includes both default/no-default features +# * --optional-deps is needed for serde feature +cargo hack "${cmd}" --each-feature --optional-deps +# Run with all features +cargo "${cmd}" --all-features + +if [[ "${RUST_VERSION}" == "nightly"* ]]; then + # Check benchmarks + cargo check --benches + + # Check minimal versions + # Remove dev-dependencies from Cargo.toml to prevent the next `cargo update` + # from determining minimal versions based on dev-dependencies. + cargo hack --remove-dev-deps --workspace + # Update Cargo.lock to minimal version dependencies. + cargo update -Z minimal-versions + cargo check --all-features +fi diff --git a/vendor/bytes/ci/tsan.sh b/vendor/bytes/ci/tsan.sh new file mode 100755 index 00000000..ca520bd7 --- /dev/null +++ b/vendor/bytes/ci/tsan.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -ex + +export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0" + +# Run address sanitizer +RUSTFLAGS="-Z sanitizer=address" \ +cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut + +# Run thread sanitizer +RUSTFLAGS="-Z sanitizer=thread" \ +cargo -Zbuild-std test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut |
