-
Notifications
You must be signed in to change notification settings - Fork 163
75 lines (70 loc) · 2.32 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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 "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