Adds CI support.
This commit is contained in:
parent
6e8f4dd4a5
commit
3c1fc4615f
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
type: docker
|
||||
steps:
|
||||
- name: test-debug-linux
|
||||
image: deukhoofd/linux64builder
|
||||
commands:
|
||||
- cargo nextest run
|
||||
- name: test-release-linux
|
||||
image: deukhoofd/linux64builder
|
||||
commands:
|
||||
- cargo nextest run --release
|
||||
depends_on:
|
||||
- test-debug-linux
|
||||
- name: test-miri-release-linux
|
||||
image: deukhoofd/linux64builder
|
||||
commands:
|
||||
- cargo miri test --release
|
||||
depends_on:
|
||||
- test-debug-linux
|
||||
- name: test-coverage
|
||||
image: deukhoofd/linux64builder
|
||||
commands:
|
||||
- cargo llvm-cov nextest
|
||||
depends_on:
|
||||
- test-debug-linux
|
|
@ -77,6 +77,7 @@ mod tests {
|
|||
use test::Bencher;
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(miri, ignore)]
|
||||
fn create_random() {
|
||||
let _default = Random::default();
|
||||
let _empty = Random::new(100);
|
||||
|
@ -132,6 +133,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(miri, ignore)]
|
||||
fn check_random_distribution() {
|
||||
let mut v = Random::new(10);
|
||||
const AMOUNT: usize = 100_000;
|
||||
|
@ -155,6 +157,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(miri, ignore)]
|
||||
fn check_random_distribution_0_to_3() {
|
||||
let mut v = Random::new(10);
|
||||
const AMOUNT: usize = 100_000;
|
||||
|
@ -182,9 +185,10 @@ mod tests {
|
|||
}
|
||||
|
||||
#[bench]
|
||||
#[cfg_attr(miri, ignore)]
|
||||
fn bench_1000_random_ints_between(b: &mut Bencher) {
|
||||
b.iter(|| {
|
||||
let mut random = Random::default();
|
||||
let mut random = Random::new(10);
|
||||
for _ in 0..1000 {
|
||||
black_box(random.get_between(0, 100));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue