Skip to content

add no_std to alloc contexts #565

add no_std to alloc contexts

add no_std to alloc contexts #565

Workflow file for this run

name: Rust
on:
push:
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build:
- pinned
- stable
- beta
- nightly
include:
- build: pinned
os: ubuntu-20.04
rust: 1.65.0
- build: stable
os: ubuntu-20.04
rust: stable
- build: beta
os: ubuntu-20.04
rust: beta
- build: nightly
os: ubuntu-20.04
rust: nightly
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- name: Build
run: cd proptest && cargo build --verbose
- name: Run tests
run: cd proptest && cargo test --verbose
- name: Build coverage no-default-features
if: ${{ matrix.build == 'stable' }}
env:
RUST_FLAGS: "-C link-dead-code"
run: cd proptest && cargo build --no-default-features --features default-code-coverage
- name: Build fork no-default-features
if: ${{ matrix.build == 'stable' }}
run: cd proptest && cargo build --no-default-features --features fork
- name: Build lib std no-default-features
if: ${{ matrix.build == 'stable' }}
run: cd proptest && cargo build --lib --no-default-features --features std
- name: Build rng no-default-features
if: ${{ matrix.build == 'nightly' }}
run: cd proptest && cargo build --no-default-features --features "no_std alloc unstable hardware-rng"
- name: Run persistence tests
if: ${{ matrix.build == 'nightly' }}
run: cd proptest/test-persistence-location && ./run-tests.sh
- name: Clean
run: cargo clean
- name: Build derive
run: cd proptest-derive && cargo build
- name: Clean and Run tests for derive
if: ${{ matrix.build == 'nightly' }}
run: cd proptest-derive && cargo clean && cargo test
- name: Clean and Run tests for derive with features enabled
if: ${{ matrix.build == 'nightly' }}
run: cd proptest-derive && cargo clean && cargo test --features boxed_union