diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..bd60027 --- /dev/null +++ b/.drone.yml @@ -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 diff --git a/src/utils/random.rs b/src/utils/random.rs index cc7da5a..663ff8b 100644 --- a/src/utils/random.rs +++ b/src/utils/random.rs @@ -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)); }