From 8241f22116c82d17ff1c41a70f324ac187855a6a Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 24 Feb 2025 11:07:28 +0200 Subject: [PATCH] ci: use -silent in more jobs that produce a lot of OK lines normally (for test-cleancode, test-self, build-examples, build-tools) --- .github/workflows/alpine.test.sh | 9 ++-- .github/workflows/debug.yml | 8 ++-- .github/workflows/docker_ci.yml | 8 ++-- .github/workflows/other_ci.yml | 4 +- .github/workflows/periodic_ci.yml | 2 +- .github/workflows/sanitized_ci.yml | 40 +++++++++--------- .github/workflows/tools_ci.yml | 34 +++++++-------- .github/workflows/wasm_backend_ci.yml | 4 +- .github/workflows/windows_ci.yml | 42 +++++++++---------- ci/linux_ci.vsh | 5 +-- .../README.md | 4 +- 11 files changed, 78 insertions(+), 82 deletions(-) diff --git a/.github/workflows/alpine.test.sh b/.github/workflows/alpine.test.sh index 9c67c7de17..383a0937b5 100755 --- a/.github/workflows/alpine.test.sh +++ b/.github/workflows/alpine.test.sh @@ -10,14 +10,15 @@ du -s . ls -lat -##./v test-all +##./v -silent test-all ## try running the known failing tests first to get faster feedback -./v test vlib/builtin/string_test.v vlib/strings/builder_test.v +./v vlib/builtin/string_test.v +./v vlib/strings/builder_test.v -./v test-cleancode +./v -silent test-cleancode -./v test-self +./v -silent test-self ./v build-vbinaries diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 3b7c151c16..2db3a53f27 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -27,16 +27,14 @@ jobs: ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - name: All code is formatted - run: ./v test-cleancode + run: ./v -silent test-cleancode - name: Self tests - run: | - ./v -cg cmd\tools\vtest-self.v - ./v test-self + run: ./v -silent test-self - name: Test v->js run: ./v -o hi.js examples/js_hello_world.v && node hi.js - name: Test v binaries run: ./v build-vbinaries - name: Build examples - run: ./v build-examples + run: ./v -silent build-examples - name: v2 self compilation run: .\v.exe -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v diff --git a/.github/workflows/docker_ci.yml b/.github/workflows/docker_ci.yml index 8ad8654da0..1e79d9506d 100644 --- a/.github/workflows/docker_ci.yml +++ b/.github/workflows/docker_ci.yml @@ -49,9 +49,9 @@ jobs: - name: Build V run: CC=gcc make - name: All code is formatted - run: VJOBS=1 ./v test-cleancode + run: ./v -silent test-cleancode - name: Run only essential tests - run: VTEST_JUST_ESSENTIAL=1 ./v test-self + run: VTEST_JUST_ESSENTIAL=1 ./v -silent test-self docker-ubuntu-musl: runs-on: ubuntu-24.04 @@ -74,6 +74,6 @@ jobs: ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - name: All code is formatted - run: ./v test-cleancode + run: ./v -silent test-cleancode - name: Test V fixed tests - run: ./v test-self vlib + run: ./v -silent test-self vlib diff --git a/.github/workflows/other_ci.yml b/.github/workflows/other_ci.yml index effd858921..2099824dc1 100644 --- a/.github/workflows/other_ci.yml +++ b/.github/workflows/other_ci.yml @@ -57,9 +57,9 @@ jobs: - name: Build local v run: make -j4 && ./v symlink - name: v test-cleancode - run: ./v test-cleancode + run: ./v -silent test-cleancode - name: v test-fmt - run: ./v test-fmt + run: ./v -silent test-fmt performance-regressions: runs-on: ubuntu-24.04 diff --git a/.github/workflows/periodic_ci.yml b/.github/workflows/periodic_ci.yml index d506dc0c5a..1aeeb3b005 100644 --- a/.github/workflows/periodic_ci.yml +++ b/.github/workflows/periodic_ci.yml @@ -37,4 +37,4 @@ jobs: if: runner.os == 'Windows' run: ./make.bat -msvc && ./v -o v2.exe cmd/v && ./v2 -showcc -o v.exe cmd/v && ./v doctor - name: Test - run: ./v -d network test-self vlib/net + run: ./v -d network -silent test-self vlib/net diff --git a/.github/workflows/sanitized_ci.yml b/.github/workflows/sanitized_ci.yml index 9876258c7f..9ffbff3a1b 100644 --- a/.github/workflows/sanitized_ci.yml +++ b/.github/workflows/sanitized_ci.yml @@ -88,7 +88,7 @@ jobs: - name: Build V run: make -j4 && ./v symlink - name: Ensure code is well formatted - run: ./v test-cleancode + run: ./v -silent test-cleancode - name: Install dependencies run: | ./v retry -- sudo apt update @@ -100,9 +100,9 @@ jobs: - name: Self tests (-fsanitize=undefined) run: | ./v -cflags -fsanitize=undefined -o v2 cmd/v - ./v2 -cflags -fsanitize=undefined test-self vlib + ./v2 -cflags -fsanitize=undefined -silent test-self vlib - name: Build examples (V compiled with -fsanitize=undefined) - run: ./v2 build-examples + run: ./v2 -silent build-examples sanitize-undefined-gcc: runs-on: ubuntu-22.04 @@ -117,7 +117,7 @@ jobs: - name: Build V run: make -j4 && ./v symlink - name: Ensure code is well formatted - run: ./v test-cleancode + run: ./v -silent test-cleancode - name: Install dependencies run: | ./v retry -- sudo apt update @@ -128,9 +128,9 @@ jobs: - name: Self tests (-fsanitize=undefined) run: | ./v -cflags -fsanitize=undefined -o v2 cmd/v - ./v2 -cflags -fsanitize=undefined test-self vlib + ./v2 -cflags -fsanitize=undefined -silent test-self vlib - name: Build examples (V compiled with -fsanitize=undefined) - run: ./v2 build-examples + run: ./v2 -silent build-examples tests-sanitize-address-clang: runs-on: ubuntu-22.04 @@ -146,7 +146,7 @@ jobs: - name: Build V run: make -j4 && ./v symlink - name: Ensure code is well formatted - run: ./v test-cleancode + run: ./v -silent test-cleancode - name: Install dependencies run: | ./v retry -- sudo apt update @@ -156,13 +156,13 @@ jobs: - name: Recompile V with -cstrict run: ./v -cg -cstrict -o v cmd/v - name: Self tests (-fsanitize=address) - run: ./v -cflags -fsanitize=address,pointer-compare,pointer-subtract test-self vlib + run: ./v -cflags -fsanitize=address,pointer-compare,pointer-subtract -silent test-self vlib - name: Self tests (V compiled with -fsanitize=address) run: | ./v -cflags -fsanitize=address -o v cmd/v - ./v -cc tcc test-self -asan-compiler vlib + ./v -cc tcc -silent test-self -asan-compiler vlib - name: Build examples (V compiled with -fsanitize=address) - run: ./v build-examples + run: ./v -silent build-examples sanitize-address-msvc: runs-on: windows-2019 @@ -180,13 +180,13 @@ jobs: .\make.bat -msvc .\v.exe self - name: Ensure code is well formatted - run: .\v.exe test-cleancode + run: .\v.exe -silent test-cleancode # - name: Install dependencies # run: | # .\v.exe setup-freetype # .\.github\workflows\windows-install-sqlite.bat # - name: Self tests (/fsanitize=address) # TODO: - # run: .\v.exe -cflags "/fsanitize=address" test-self vlib + # run: .\v.exe -cflags "/fsanitize=address" -silent test-self vlib sanitize-address-gcc: runs-on: ubuntu-22.04 @@ -202,7 +202,7 @@ jobs: - name: Build V run: make -j4 && ./v symlink - name: Ensure code is well formatted - run: ./v test-cleancode + run: ./v -silent test-cleancode - name: Install dependencies run: | ./v retry -- sudo apt update @@ -212,13 +212,13 @@ jobs: - name: Recompile V with -cstrict run: ./v -cg -cstrict -o v cmd/v - name: Self tests (-fsanitize=address) - run: ./v -cflags -fsanitize=address test-self vlib + run: ./v -cflags -fsanitize=address -silent test-self vlib - name: Self tests (V compiled with -fsanitize=address) run: | ./v -cflags -fsanitize=address,pointer-compare,pointer-subtract -o v cmd/v - ./v -cc tcc test-self -asan-compiler vlib + ./v -cc tcc -silent test-self -asan-compiler vlib - name: Build examples (V compiled with -fsanitize=address) - run: ./v build-examples + run: ./v -silent build-examples sanitize-memory-clang: runs-on: ubuntu-22.04 @@ -232,7 +232,7 @@ jobs: - name: Build V run: make -j4 && ./v symlink - name: Ensure code is well formatted - run: ./v test-cleancode + run: ./v -silent test-cleancode - name: Install dependencies run: | ./v retry -- sudo apt update @@ -242,10 +242,10 @@ jobs: - name: Recompile V with clang and -cstrict run: ./v -cc clang -cg -cstrict -o v cmd/v - name: Self tests (-fsanitize=memory) - run: ./v -cflags -fsanitize=memory test-self -msan-compiler vlib + run: ./v -cflags -fsanitize=memory -silent test-self -msan-compiler vlib - name: Self tests (V compiled with -fsanitize=memory) run: | ./v -cflags -fsanitize=memory -o v cmd/v - ./v -cc tcc test-self -msan-compiler vlib + ./v -cc tcc -silent test-self -msan-compiler vlib - name: Build examples (V compiled with -fsanitize=memory) - run: ./v build-examples + run: ./v -silent build-examples diff --git a/.github/workflows/tools_ci.yml b/.github/workflows/tools_ci.yml index dd6efb5127..beb2a38c61 100644 --- a/.github/workflows/tools_ci.yml +++ b/.github/workflows/tools_ci.yml @@ -38,27 +38,27 @@ jobs: - name: Code in cmd/ is formatted run: ./v fmt -verify cmd/ - name: Check build-tools - run: ./v -N -W -check build-tools + run: ./v -silent -N -W -check build-tools - name: Test tools - run: ./v test-self cmd + run: ./v -silent test-self cmd - name: Test tools (-cstrict) if: ${{ matrix.cc != 'tcc' }} - run: ./v -W -cstrict test-self cmd + run: ./v -silent -W -cstrict test-self cmd - name: Test sanitized if: ${{ matrix.cc != 'tcc' }} run: | export VNATIVE_SKIP_LIBC_VV=1 if [[ ${{ matrix.cc }} == "clang" ]]; then - cmd="./v -cc clang -cflags -fsanitize=undefined test-self -ubsan-compiler cmd" + cmd="./v -silent -cc clang -cflags -fsanitize=undefined test-self -ubsan-compiler cmd" echo $cmd && $cmd - cmd="./v -cc clang -cflags -fsanitize=memory test-self -msan-compiler cmd" + cmd="./v -silent -cc clang -cflags -fsanitize=memory test-self -msan-compiler cmd" echo $cmd && $cmd else - cmd="./v -cc gcc -cflags -fsanitize=thread test-self cmd" + cmd="./v -silent -cc gcc -cflags -fsanitize=thread test-self cmd" echo $cmd && $cmd - cmd="./v -cc gcc -cflags -fsanitize=address,leak,undefined,shift,shift-exponent,shift-base,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,bounds-strict,alignment,object-size,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr test-self -asan-compiler cmd/tools" + cmd="./v -silent -cc gcc -cflags -fsanitize=address,leak,undefined,shift,shift-exponent,shift-base,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,bounds-strict,alignment,object-size,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr test-self -asan-compiler cmd/tools" echo $cmd && $cmd - ## cmd="./v -cc gcc -cflags -fsanitize=kernel-address test-self -asan-compiler cmd" + ## cmd="./v -silent -cc gcc -cflags -fsanitize=kernel-address test-self -asan-compiler cmd" ## echo $cmd && $cmd fi @@ -75,11 +75,11 @@ jobs: - name: Build V run: make -j4 && ./v -showcc -o v cmd/v && ./v doctor - name: Check build-tools - run: ./v -N -W -check build-tools + run: ./v -silent -N -W -check build-tools - name: Test tools - run: ./v test-self cmd + run: ./v -silent test-self cmd - name: Test tools (-cstrict) - run: ./v -W -cstrict test-self cmd + run: ./v -silent -W -cstrict test-self cmd tools-windows: runs-on: windows-2019 @@ -94,12 +94,12 @@ jobs: - name: Build V run: ./make.bat -${{ matrix.cc }} && ./v -o v2.exe cmd/v && ./v2 -showcc -o v.exe cmd/v && ./v doctor - name: Check build tools - run: ./v -N -W -check build-tools + run: ./v -silent -N -W -check build-tools - name: Test tools - run: ./v test-self cmd + run: ./v -silent test-self cmd - name: Test tools (-cstrict) if: ${{ matrix.cc == 'msvc' }} - run: ./v -W -cstrict test-self cmd + run: ./v -silent -W -cstrict test-self cmd tools-docker-ubuntu-musl: runs-on: ubuntu-24.04 @@ -124,8 +124,8 @@ jobs: ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - name: Check build tools - run: ./v -N -W -check build-tools + run: ./v -silent -N -W -check build-tools - name: Test tools - run: ./v test-self cmd + run: ./v -silent test-self cmd - name: Test tools (-cstrict) - run: ./v -W -cstrict test-self cmd + run: ./v -silent -W -cstrict test-self cmd diff --git a/.github/workflows/wasm_backend_ci.yml b/.github/workflows/wasm_backend_ci.yml index b114009c09..a3a3f412ec 100644 --- a/.github/workflows/wasm_backend_ci.yml +++ b/.github/workflows/wasm_backend_ci.yml @@ -61,8 +61,8 @@ jobs: if: runner.os == 'Windows' run: ./make.bat - name: Build examples - run: ./v build-examples + run: ./v -silent build-examples - name: Setup Wasmer uses: wasmerio/setup-wasmer@v3.1 - name: Test the WASM backend - run: ./v test vlib/v/gen/wasm/tests/ + run: ./v -silent test vlib/v/gen/wasm/tests/ diff --git a/.github/workflows/windows_ci.yml b/.github/workflows/windows_ci.yml index a4fb1f7b29..385c9a7d13 100644 --- a/.github/workflows/windows_ci.yml +++ b/.github/workflows/windows_ci.yml @@ -37,7 +37,7 @@ jobs: .\make.bat -gcc .\v.exe symlink - name: All code is formatted - run: v test-cleancode + run: v -silent test-cleancode - name: Test new v.c run: | v -o v.c cmd/v @@ -55,19 +55,19 @@ jobs: v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - name: Test pure V math module - run: v -exclude @vlib/math/*.c.v test vlib/math/ + run: v -silent -exclude @vlib/math/*.c.v test vlib/math/ - name: Self tests - run: v test-self vlib + run: v -silent test-self vlib # - name: Test - # run: v test-all + # run: v -silent test-all - name: Build option_test.c.v with -autofree run: v -autofree vlib/v/tests/options/option_test.c.v - name: Test v->js run: v -o hi.js examples/js_hello_world.v && node hi.js - name: Test v binaries - run: v build-vbinaries + run: v -silent build-vbinaries - name: Build examples - run: v build-examples + run: v -silent build-examples - name: v2 self compilation run: v -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v - name: compile vdoctor.v with -prod @@ -91,7 +91,7 @@ jobs: - name: Build V with WX run: v -cflags /WX self - name: All code is formatted - run: v test-cleancode + run: v -silent test-cleancode - name: Test -cc msvc works run: v -no-retry-compilation run examples/hello_world.v - name: Install dependencies @@ -107,19 +107,17 @@ jobs: v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - name: Test pure V math module - run: v -exclude @vlib/math/*.c.v test vlib/math/ + run: v -silent -exclude @vlib/math/*.c.v test vlib/math/ - name: Self tests - run: | - v -cg cmd\tools\vtest-self.v - v test-self vlib + run: v -silent test-self vlib # - name: Test - # run: v test-all + # run: v -silent test-all - name: Test v->js run: v -o hi.js examples/js_hello_world.v && node hi.js - name: Test v binaries run: v build-vbinaries - name: Build examples - run: v build-examples + run: v -silent build-examples - name: v2 self compilation run: v -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v @@ -135,7 +133,7 @@ jobs: .\make.bat -tcc .\v.exe symlink - name: All code is formatted - run: v test-cleancode + run: v -silent test-cleancode - name: Test new v.c run: | v -o v.c cmd/v @@ -158,17 +156,17 @@ jobs: - name: Test ./v doc -v clipboard *BEFORE building tools* run: v doc -v clipboard - name: Test v build-tools - run: v -W build-tools + run: v -silent -W build-tools - name: Test pure V math module - run: v -exclude @vlib/math/*.c.v test vlib/math/ + run: v -silent -exclude @vlib/math/*.c.v test vlib/math/ - name: Self tests - run: v test-self vlib + run: v -silent test-self vlib - name: Test v->js run: v -o hi.js examples/js_hello_world.v && node hi.js - name: Test v binaries run: v build-vbinaries - name: Build examples - run: v build-examples + run: v -silent build-examples - name: v2 self compilation run: v -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v && .\v3.exe -o v4.exe cmd/v @@ -196,18 +194,18 @@ jobs: # run: v -stats .github\workflows\make_sure_ci_run_with_32bit_compiler_test.v # # - name: Test v build-tools - # run: v -W build-tools + # run: v -silent -W build-tools # # - name: Test ./v doc clipboard # run: v doc clipboard # # - name: Self tests - # run: v test-self vlib + # run: v -silent test-self vlib # - name: Test v->js # run: v -o hi.js examples/js_hello_world.v && node hi.js # - name: Test v binaries - # run: v build-vbinaries + # run: v -silent build-vbinaries # - name: Build examples - # run: v build-examples + # run: v -silent build-examples # - name: v2 self compilation # run: v -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v diff --git a/ci/linux_ci.vsh b/ci/linux_ci.vsh index bc60ca4bd5..71a1163ae6 100644 --- a/ci/linux_ci.vsh +++ b/ci/linux_ci.vsh @@ -56,9 +56,8 @@ fn install_dependencies_for_examples_and_tools_tcc() { exec('v retry -- sudo apt install --quiet -y libssl-dev sqlite3 libsqlite3-dev valgrind') exec('v retry -- sudo apt install --quiet -y libfreetype6-dev libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev') // The following is needed for examples/wkhtmltopdf.v - exec('v retry -- wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb') - exec('v retry -- sudo apt install --quiet -y xfonts-75dpi xfonts-base') - exec('v retry -- sudo apt install --quiet -y expect') + exec('v retry -- sudo apt install --quiet -y xfonts-75dpi xfonts-base expect') + exec('v retry -- wget --quiet https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb') exec('v retry -- sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb') } diff --git a/tutorials/building_a_simple_web_blog_with_vweb/README.md b/tutorials/building_a_simple_web_blog_with_vweb/README.md index 94f1b23a93..fd7f6c0f30 100644 --- a/tutorials/building_a_simple_web_blog_with_vweb/README.md +++ b/tutorials/building_a_simple_web_blog_with_vweb/README.md @@ -24,7 +24,7 @@ The code is available [here](./code/blog). ### Installing V ``` -wget https://github.com/vlang/v/releases/latest/download/v_linux.zip +wget --quiet https://github.com/vlang/v/releases/latest/download/v_linux.zip unzip v_linux.zip cd v sudo ./v symlink @@ -423,4 +423,4 @@ Without this flag mbedtls will be embedded, and the binary size will increase to ### To be continued... -For an example of a more sophisticated web app written in V, check out Vorum: https://github.com/vlang/vorum \ No newline at end of file +For an example of a more sophisticated web app written in V, check out Vorum: https://github.com/vlang/vorum