Skip to content

Commit

Permalink
ci: avoid duplicating work by removing the remaining -skip-unused t…
Browse files Browse the repository at this point in the history
…asks, since that is the new default (#23746)
  • Loading branch information
spytheman authored Feb 17, 2025
1 parent 9bed50d commit 428b328
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 95 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/compile_discordv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@ show "Checkout last known good commit"
git checkout ce9ff457fce92d5bb15df2974440cd8292457ee0
show "Execute Tests"
v test .
show "Execute Tests with -skip-unused"
v -skip-unused test .

cd ..
rm -rf discord/
18 changes: 4 additions & 14 deletions .github/workflows/linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ jobs:
run: v run ci/linux_ci.vsh test_v_to_c_tcc
- name: v self compilation
run: v run ci/linux_ci.vsh v_self_compilation_tcc
- name: v self compilation with -skip-unused
run: v run ci/linux_ci.vsh v_self_compilation_skip_unused_tcc
- name: Test vlib modules with -skip-unused
run: v run ci/linux_ci.vsh test_vlib_skip_unused_tcc
- name: v doctor
run: v run ci/linux_ci.vsh v_doctor_tcc
- name: Verify `v test` works
Expand Down Expand Up @@ -121,18 +117,14 @@ jobs:
run: v run ci/linux_ci.vsh build_option_test_autofree_gcc
- name: V self compilation with -parallel-cc
run: v run ci/linux_ci.vsh v_self_compilation_parallel_cc_gcc
- name: Test vlib modules with -skip-unused
run: v run ci/linux_ci.vsh test_vlib_skip_unused_gcc
- name: Build modules
run: v run ci/linux_ci.vsh build_modules_gcc
- name: native machine code generation
run: v run ci/linux_ci.vsh native_machine_code_generation_gcc
- name: compile vdoctor.v with -skip-unused and -prod
run: v run ci/linux_ci.vsh compile_vdoctor_skip_unused_prod_gcc
- name: compile vup.v with -skip-unused and -prod
run: v run ci/linux_ci.vsh compile_vup_skip_unused_prod_gcc
- name: Test vlib modules with -skip-unused
run: v run ci/linux_ci.vsh test_vlib_skip_unused_gcc
- name: compile vdoctor.v with -prod
run: v run ci/linux_ci.vsh compile_vdoctor_prod_gcc
- name: compile vup.v with -prod
run: v run ci/linux_ci.vsh compile_vup_prod_gcc

clang:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -171,8 +163,6 @@ jobs:
run: v run ci/linux_ci.vsh build_examples_clang
- name: Build examples with -autofree
run: v run ci/linux_ci.vsh build_examples_autofree_clang
- name: Test vlib modules with -skip-unused
run: v run ci/linux_ci.vsh test_vlib_skip_unused_clang
- name: Build modules
run: v run ci/linux_ci.vsh build_modules_clang
- name: native machine code generation
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/macos_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,3 @@ jobs:
run: v run ci/macos_ci.vsh test_password_input
- name: Test readline
run: v run ci/macos_ci.vsh test_readline
- name: Test vlib modules with -skip-unused
run: v run ci/macos_ci.vsh test_vlib_skip_unused
10 changes: 2 additions & 8 deletions .github/workflows/puzzle_vibes_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,8 @@ jobs:
- name: Check PV compiles with -g
run: cd puzzle_vibes && v -g .

- name: Check PV compiles with -skip-unused
run: cd puzzle_vibes && v -skip-unused .

- name: Check PV compiles with both -g and -skip-unused
run: cd puzzle_vibes && v -g -skip-unused .

- name: Check PV compiles with -prod
run: cd puzzle_vibes && v -prod .

- name: Check PV compiles with -prod and -g and -skip-unused
run: cd puzzle_vibes && v -prod -g -skip-unused .
- name: Check PV compiles with -prod and -g
run: cd puzzle_vibes && v -prod -g .
12 changes: 6 additions & 6 deletions .github/workflows/release_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ jobs:
if: runner.os != 'Windows'
run: |
make
./v -cc ${{ matrix.cc }} ${{ matrix.cflags }} -skip-unused -prod -o v cmd/v
./v -cc ${{ matrix.cc }} ${{ matrix.cflags }} -skip-unused -prod cmd/tools/vup.v
./v -cc ${{ matrix.cc }} ${{ matrix.cflags }} -skip-unused -prod cmd/tools/vdoctor.v
./v -cc ${{ matrix.cc }} ${{ matrix.cflags }} -prod -o v cmd/v
./v -cc ${{ matrix.cc }} ${{ matrix.cflags }} -prod cmd/tools/vup.v
./v -cc ${{ matrix.cc }} ${{ matrix.cflags }} -prod cmd/tools/vdoctor.v
- name: Compile release binaries (Windows)
if: runner.os == 'Windows'
run: |
./make.bat -msvc
./v -skip-unused -prod -cc msvc -o cmd/vprod.exe cmd/v
./v -skip-unused -prod -cc msvc cmd/tools/vup.v
./v -skip-unused -prod -cc msvc cmd/tools/vdoctor.v
./v -prod -cc msvc -o cmd/vprod.exe cmd/v
./v -prod -cc msvc cmd/tools/vup.v
./v -prod -cc msvc cmd/tools/vdoctor.v
del *.exe
del *.tmp.obj
move cmd/vprod.exe v.exe
Expand Down
22 changes: 9 additions & 13 deletions .github/workflows/v_apps_and_modules_compile_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ jobs:
v retry -- v install vab
echo "Build vab"
v ~/.vmodules/vab
echo "Build vab with -gc boehm -skip-unused"
v -g -gc boehm -skip-unused ~/.vmodules/vab
echo "Build vab with -g"
v -g ~/.vmodules/vab
- name: Build vlang/ved
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: |
v retry -- git clone --depth 1 https://github.com/vlang/ved
cd ved && v -o ved .
echo "Build"
v .
echo "Build with -autofree ..."
v -autofree .
echo "Build with -skip-unused ..."
v -skip-unused .
echo "Build with -prod ..."
v -prod .
cd ..
Expand All @@ -97,15 +97,15 @@ jobs:
run: |
v retry -- v install pdf
echo "PDF examples should compile"
v -skip-unused should-compile-all ~/.vmodules/pdf/examples
v should-compile-all ~/.vmodules/pdf/examples
- name: Build vlang/libsodium
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: |
echo "Install the libsodium wrapper"
v retry -- v install libsodium
echo "Test libsodium"
VJOBS=1 v -skip-unused test ~/.vmodules/libsodium
VJOBS=1 v test ~/.vmodules/libsodium
- name: Build vlang/coreutils
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
Expand All @@ -126,7 +126,6 @@ jobs:
v retry -- git clone https://github.com/vlang/gitly /tmp/gitly
echo "Build Gitly"
v -cc gcc /tmp/gitly
v -skip-unused -cc gcc /tmp/gitly
## echo "Build Gitly with -autofree"
## v -cc gcc -autofree /tmp/gitly
echo "Compile gitly.css from gitly.scss"
Expand All @@ -141,7 +140,6 @@ jobs:
v retry -- v install ui
v -no-parallel ~/.vmodules/ui/examples/rectangles.v
v -no-parallel ~/.vmodules/ui/examples/users.v
# v -skip-unused -no-parallel ~/.vmodules/ui/examples/users.v
# v run ~/.vmodules/ui/examples/build_examples.vsh
- name: Build vlang/v-analyzer
Expand Down Expand Up @@ -177,7 +175,6 @@ jobs:
v retry -- git clone --depth=1 https://github.com/vlang/go2v /tmp/go2v/
echo "Build Go2V"
v /tmp/go2v/
v -skip-unused /tmp/go2v/
echo "Run Go2V tests"
VJOBS=1 v test /tmp/go2v/
Expand Down Expand Up @@ -208,7 +205,6 @@ jobs:
v -shared ~/.vmodules/msgpack/
echo "Run msgpack tests"
v test ~/.vmodules/msgpack/
v -skip-unused test ~/.vmodules/msgpack/
echo "MessagePack examples should compile"
v should-compile-all ~/.vmodules/msgpack/examples
Expand All @@ -219,8 +215,8 @@ jobs:
# v retry -- v install nedpals.vex
# echo "Compile all of the Vex examples"
# v should-compile-all ~/.vmodules/nedpals/vex/examples
# echo "Compile the simple Vex example with -skip-unused"
# v -skip-unused ~/.vmodules/nedpals/vex/examples/simple_example.v
# echo "Compile the simple Vex example"
# v ~/.vmodules/nedpals/vex/examples/simple_example.v
# echo "Run Vex Tests"
# v test ~/.vmodules/nedpals/vex

Expand All @@ -238,4 +234,4 @@ jobs:
run: |
v retry -- v install markdown
v retry -- git clone --depth 1 https://github.com/vlang/vpm
cd vpm && v . && v -skip-unused .
cd vpm && v .
20 changes: 6 additions & 14 deletions .github/workflows/windows_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@ jobs:
run: v 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 -skip-unused and -prod
run: v -showcc -skip-unused -prod cmd/tools/vdoctor.v
- name: compile vup.v with -skip-unused and -prod
run: v -showcc -skip-unused -prod cmd/tools/vup.v
- name: Test vlib modules with -skip-unused
run: v -skip-unused test vlib/builtin/ vlib/math vlib/flag/ vlib/os/ vlib/strconv/
- name: compile vdoctor.v with -prod
run: v -showcc -prod cmd/tools/vdoctor.v
- name: compile vup.v with -prod
run: v -showcc -prod cmd/tools/vup.v

msvc:
runs-on: windows-2019
Expand All @@ -96,8 +94,8 @@ jobs:
run: v -cflags /WX self
- name: All code is formatted
run: v test-cleancode
- name: Test -cc msvc -gc boehm works
run: v -no-retry-compilation -gc boehm run examples/hello_world.v
- name: Test -cc msvc works
run: v -no-retry-compilation run examples/hello_world.v
- name: Install dependencies
run: |
v retry -- v setup-freetype
Expand Down Expand Up @@ -126,8 +124,6 @@ jobs:
run: v build-examples
- name: v2 self compilation
run: v -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v
- name: Test vlib modules with -skip-unused
run: v -skip-unused test vlib/builtin/ vlib/math vlib/flag/ vlib/os/ vlib/strconv/

tcc:
runs-on: windows-2019
Expand Down Expand Up @@ -180,10 +176,6 @@ jobs:
run: v 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
- name: v2 self compilation with -gc boehm
run: v -o v2.exe -gc boehm cmd/v && .\v2.exe -o v3.exe -gc boehm cmd/v && .\v3.exe -o v4.exe -gc boehm cmd/v
- name: Test vlib modules with -skip-unused
run: v -skip-unused test vlib/builtin/ vlib/math vlib/flag/ vlib/os/ vlib/strconv/

## tcc32
# - name: Build with make.bat -tcc32
Expand Down
36 changes: 6 additions & 30 deletions ci/linux_ci.vsh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ fn self_tests() {
}
}

fn test_vlib_skip_unused() {
exec('v -skip-unused test vlib/builtin/ vlib/math vlib/flag/ vlib/os/ vlib/strconv/')
}

fn build_examples() {
if common.is_github_job {
exec('v build-examples')
Expand Down Expand Up @@ -75,14 +71,6 @@ fn v_self_compilation_tcc() {
exec('v -o v2 cmd/v && ./v2 -o v3 cmd/v && ./v3 -o v4 cmd/v')
}

fn v_self_compilation_skip_unused_tcc() {
exec('v -skip-unused -o v2 cmd/v && ./v2 -skip-unused -o v3 cmd/v && ./v3 -skip-unused -o v4 cmd/v')
}

fn test_vlib_skip_unused_tcc() {
test_vlib_skip_unused()
}

fn v_doctor_tcc() {
v_doctor()
}
Expand Down Expand Up @@ -242,10 +230,6 @@ fn v_self_compilation_parallel_cc_gcc() {
exec('v -o v2 -parallel-cc cmd/v')
}

fn test_vlib_skip_unused_gcc() {
test_vlib_skip_unused()
}

fn build_modules_gcc() {
exec('v build-module vlib/os')
exec('v build-module vlib/builtin')
Expand All @@ -268,12 +252,12 @@ fn native_machine_code_generation_gcc() {
exec('cd cmd/tools && ../../vprod -backend native -o 1m 1m.v && ./1m && ls')
}

fn compile_vdoctor_skip_unused_prod_gcc() {
exec('v -showcc -skip-unused -cc gcc -prod cmd/tools/vdoctor.v')
fn compile_vdoctor_prod_gcc() {
exec('v -showcc -cc gcc -prod cmd/tools/vdoctor.v')
}

fn compile_vup_skip_unused_prod_gcc() {
exec('v -showcc -skip-unused -cc gcc -prod cmd/tools/vup.v')
fn compile_vup_prod_gcc() {
exec('v -showcc -cc gcc -prod cmd/tools/vup.v')
}

//
Expand Down Expand Up @@ -344,10 +328,6 @@ fn build_examples_autofree_clang() {
exec('v -autofree -experimental -o tetris examples/tetris/tetris.v')
}

fn test_vlib_skip_unused_clang() {
test_vlib_skip_unused()
}

fn build_modules_clang() {
exec('v build-module vlib/os')
exec('v build-module vlib/builtin')
Expand Down Expand Up @@ -380,8 +360,6 @@ const all_tasks = {
'install_dependencies_for_examples_and_tools_tcc': Task{install_dependencies_for_examples_and_tools_tcc, 'Install deps for examples/tools (tcc)'}
'test_v_to_c_tcc': Task{test_v_to_c_tcc, 'Test v->c with tcc'}
'v_self_compilation_tcc': Task{v_self_compilation_tcc, 'V self compilation (tcc)'}
'v_self_compilation_skip_unused_tcc': Task{v_self_compilation_skip_unused_tcc, 'V self compilation with -skip-unused (tcc)'}
'test_vlib_skip_unused_tcc': Task{test_vlib_skip_unused_tcc, 'Test vlib modules with -skip-unused (tcc)'}
'v_doctor_tcc': Task{v_doctor_tcc, 'v doctor (tcc)'}
'verify_v_test_works_tcc': Task{verify_v_test_works_tcc, 'Verify `v test` works (tcc)'}
'test_pure_v_math_module_tcc': Task{test_pure_v_math_module_tcc, 'Test pure V math module (tcc)'}
Expand Down Expand Up @@ -417,11 +395,10 @@ const all_tasks = {
'build_blog_autofree_gcc': Task{build_blog_autofree_gcc, 'Build blog tutorial with -autofree (gcc)'}
'build_option_test_autofree_gcc': Task{build_option_test_autofree_gcc, 'Build option_test.c.v with -autofree (gcc)'}
'v_self_compilation_parallel_cc_gcc': Task{v_self_compilation_parallel_cc_gcc, 'V self compilation with -parallel-cc (gcc)'}
'test_vlib_skip_unused_gcc': Task{test_vlib_skip_unused_gcc, 'Test vlib modules with -skip-unused (gcc)'}
'build_modules_gcc': Task{build_modules_gcc, 'Build modules (gcc)'}
'native_machine_code_generation_gcc': Task{native_machine_code_generation_gcc, 'native machine code generation (gcc)'}
'compile_vdoctor_skip_unused_prod_gcc': Task{compile_vdoctor_skip_unused_prod_gcc, 'compile vdoctor with -skip-unused -prod (gcc)'}
'compile_vup_skip_unused_prod_gcc': Task{compile_vup_skip_unused_prod_gcc, 'compile vup with -skip-unused -prod (gcc)'}
'compile_vdoctor_prod_gcc': Task{compile_vdoctor_prod_gcc, 'compile vdoctor with -prod (gcc)'}
'compile_vup_prod_gcc': Task{compile_vup_prod_gcc, 'compile vup with -prod (gcc)'}
// clang tasks
'all_code_is_formatted_clang': Task{all_code_is_formatted_clang, 'All code is formatted (clang)'}
'install_dependencies_for_examples_and_tools_clang': Task{install_dependencies_for_examples_and_tools_clang, 'Install deps for examples/tools (clang)'}
Expand All @@ -437,7 +414,6 @@ const all_tasks = {
'self_tests_cstrict_clang': Task{self_tests_cstrict_clang, 'Self tests (-cstrict) (clang)'}
'build_examples_clang': Task{build_examples_clang, 'Build examples (clang)'}
'build_examples_autofree_clang': Task{build_examples_autofree_clang, 'Build examples with -autofree (clang)'}
'test_vlib_skip_unused_clang': Task{test_vlib_skip_unused_clang, 'Test vlib modules with -skip-unused (clang)'}
'build_modules_clang': Task{build_modules_clang, 'Build modules (clang)'}
'native_machine_code_generation_clang': Task{native_machine_code_generation_clang, 'native machine code generation (clang)'}
}
Expand Down
5 changes: 0 additions & 5 deletions ci/macos_ci.vsh
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ fn test_readline() {
exec('v -progress test examples/readline/')
}

fn test_vlib_skip_unused() {
exec('v -skip-unused -progress test vlib/builtin/ vlib/math vlib/flag/ vlib/os/ vlib/strconv/')
}

const all_tasks = {
'test_symlink': Task{test_symlink, 'Test symlink'}
'test_cross_compilation': Task{test_cross_compilation, 'Test cross compilation to Linux'}
Expand All @@ -136,7 +132,6 @@ const all_tasks = {
'v_self_compilation_parallel_cc': Task{v_self_compilation_parallel_cc, 'V self compilation with -parallel-cc'}
'test_password_input': Task{test_password_input, 'Test password input'}
'test_readline': Task{test_readline, 'Test readline'}
'test_vlib_skip_unused': Task{test_vlib_skip_unused, 'Test vlib modules with -skip-unused'}
}

common.run(all_tasks)

0 comments on commit 428b328

Please sign in to comment.