Skip to content

Update zerocopy requirement from 0.6.0 to 0.7.11 #974

Update zerocopy requirement from 0.6.0 to 0.7.11

Update zerocopy requirement from 0.6.0 to 0.7.11 #974

Workflow file for this run

name: Rust
on:
pull_request:
branches:
- main
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy
override: true
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
default:
name: Cargo Test on ${{ matrix.os }}
env:
RUST_BACKTRACE: 1
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: Cache target
uses: actions/cache@v2
env:
cache-name: cache-default-target-and-lockfile
with:
path: |
target
Cargo.lock
~/.rustup
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}
- name: linux coredump setup
if: ${{ runner.os == 'linux' }}
run: |
ulimit -c unlimited
echo "$PWD/core-dumps/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern
mkdir core-dumps
- name: cargo test
run: |
rustup update --no-self-update
cargo test --release --no-default-features --features=for-internal-testing-only -- --nocapture
- uses: actions/upload-artifact@v2
if: ${{ failure() && runner.os == 'linux' }}
with:
name: linux-core-dumps
path: |
./core-dumps/*
./target/release/deps/test_*
examples:
name: Example Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache target
uses: actions/cache@v2
env:
cache-name: cache-examples-target-and-lockfile
with:
path: |
target
Cargo.lock
~/.rustup
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}
- name: example tests
run: |
rustup update --no-self-update
cargo run --example playground
cargo run --example structured
cross-compile:
name: Cross Compile
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: cross compile
run: |
set -eo pipefail
echo "cross build"
scripts/cross_compile.sh
burn-in:
name: Burn In
env:
RUST_BACKTRACE: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache target
uses: actions/cache@v2
env:
cache-name: cache-stress2-asan-target-and-lockfile
with:
path: |
benchmarks/stress2/target
benchmarks/stress2/Cargo.lock
~/.rustup
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}
- name: burn in
run: |
set -eo pipefail
pushd benchmarks/stress2
ulimit -c unlimited
echo "$PWD/core-dumps/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern
mkdir core-dumps
rustup toolchain install nightly
rustup toolchain install nightly --component rust-src
rustup update
rm -rf default.sled || true
export RUSTFLAGS="-Z sanitizer=address"
export ASAN_OPTIONS="detect_odr_violation=0"
cargo +nightly build --release --target x86_64-unknown-linux-gnu
target/x86_64-unknown-linux-gnu/release/stress2 --duration=240
rm -rf default.sled
- name: print backtraces with gdb
if: ${{ failure() }}
run: |
sudo apt-get update
sudo apt-get install gdb
pushd benchmarks/stress2
echo "first backtrace:"
gdb target/release/stress2 core-dumps/* -batch -ex 'bt -frame-info source-and-location'
echo ""
echo ""
echo ""
echo "all backtraces:"
gdb target/release/stress2 core-dumps/* -batch -ex 't a a bt -frame-info source-and-location'
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: linux-core-dumps
path: |
./benchmarks/stress2/core-dumps/*
./benchmarks/stress2/target/release/stress2
sanitizers:
name: Sanitizers
env:
RUST_BACKTRACE: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache rustup
uses: actions/cache@v2
env:
cache-name: cache-sanitizers-target-and-lockfile
with:
path: |
~/.rustup
benchmarks/stress2/target
benchmarks/stress2/Cargo.lock
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}
- name: sanitizers
run: |
set -eo pipefail
scripts/sanitizers.sh