diff --git a/.github/workflows/linux_ci.yml b/.github/workflows/linux_ci.yml index 24e5dc593a..80e397ab68 100644 --- a/.github/workflows/linux_ci.yml +++ b/.github/workflows/linux_ci.yml @@ -76,10 +76,12 @@ jobs: run: TZ=Europe/Paris ./v test vlib/time/ - name: Build examples run: ./v -W build-examples - - name: Test building v tools + - name: Build v tools run: ./v -W build-tools - - name: Test v binaries + - name: Build v binaries run: ./v build-vbinaries + - name: Build benches + run: ./v should-compile-all vlib/v/tests/bench/ - name: Run a VSH script run: ./v run examples/v_script.vsh - name: Test v tutorials diff --git a/vlib/v/tests/bench/gcboehm/GC_bench.v b/vlib/v/tests/bench/gcboehm/GC_bench.v index c7aaadf17d..6aca90b557 100644 --- a/vlib/v/tests/bench/gcboehm/GC_bench.v +++ b/vlib/v/tests/bench/gcboehm/GC_bench.v @@ -26,21 +26,21 @@ const ( fn waste_mem() { mut objs := PtrPtrObj{ - nxt: []&PtrObj{len: n} + nxt: unsafe { []&PtrObj{len: n} } } for { - sz := rand.int_in_range(10, 1000) + sz := rand.int_in_range(10, 1000) or { 10 } mut new_obj := &PtrObj{ - nxt: []&DataObj{len: sz} + nxt: unsafe { []&DataObj{len: sz} } } - sz2 := rand.int_in_range(10, 500000) + sz2 := rand.int_in_range(10, 500000) or { 10 } new_obj2 := &DataObj{ - data: []f64{len: sz2} + data: unsafe { []f64{len: sz2} } } - idx2 := rand.int_in_range(0, sz) + idx2 := rand.int_in_range(0, sz) or { 0 } new_obj.nxt[idx2] = new_obj2 // non-equally distributed random index - idx := int(math.sqrt(math.sqrt(rand.f64n(n4)))) + idx := int(math.sqrt(math.sqrt(rand.f64n(n4) or { 0.0 }))) objs.nxt[idx] = new_obj } }