diff --git a/.github/workflows/macos_ci.yml b/.github/workflows/macos_ci.yml index d76d5b1649..eeccf61b8a 100644 --- a/.github/workflows/macos_ci.yml +++ b/.github/workflows/macos_ci.yml @@ -36,6 +36,8 @@ jobs: run: make -j4 && ./v symlink - name: Test symlink run: v run ci/macos_ci.vsh test_symlink + - name: v doctor + run: v run ci/macos_ci.vsh v_doctor - name: Test cross compilation to Linux run: v run ci/macos_ci.vsh test_cross_compilation - name: Build V with -cstrict @@ -62,8 +64,8 @@ jobs: run: v run ci/macos_ci.vsh build_blog_autofree - name: Build examples with -prod run: v run ci/macos_ci.vsh build_examples_prod - - name: v doctor - run: v run ci/macos_ci.vsh v_doctor + - name: Build examples with V build with tcc + run: v run ci/macos_ci.vsh build_examples_v_compiled_with_tcc - name: V self compilation with -usecache run: v run ci/macos_ci.vsh v_self_compilation_usecache - name: V self compilation with -parallel-cc diff --git a/ci/macos_ci.vsh b/ci/macos_ci.vsh index f9dd7aaf42..04086dde85 100644 --- a/ci/macos_ci.vsh +++ b/ci/macos_ci.vsh @@ -2,6 +2,7 @@ import os enum Command { test_symlink + v_doctor test_cross_compilation build_with_cstrict all_code_is_formatted @@ -15,7 +16,7 @@ enum Command { build_tetris_autofree build_blog_autofree build_examples_prod - v_doctor + build_examples_v_compiled_with_tcc v_self_compilation_usecache v_self_compilation_parallel_cc test_password_input @@ -47,6 +48,7 @@ fn run_step(step Command) { println('Running ${step}...') match step { .test_symlink { test_symlink() } + .v_doctor { v_doctor() } .test_cross_compilation { test_cross_compilation() } .build_with_cstrict { build_with_cstrict() } .all_code_is_formatted { all_code_is_formatted() } @@ -60,7 +62,7 @@ fn run_step(step Command) { .build_tetris_autofree { build_tetris_autofree() } .build_blog_autofree { build_blog_autofree() } .build_examples_prod { build_examples_prod() } - .v_doctor { v_doctor() } + .build_examples_v_compiled_with_tcc { build_examples_v_compiled_with_tcc() } .v_self_compilation_usecache { v_self_compilation_usecache() } .v_self_compilation_parallel_cc { v_self_compilation_parallel_cc() } .test_password_input { test_password_input() } @@ -69,21 +71,6 @@ fn run_step(step Command) { } } -// Helper function to execute commands and exit if they fail -fn exec(command string) { - result := os.system(command) - // or { - // eprintln('Command failed: $command\nError: $err') - // exit(1) - //} - // if result.exit_code != 0 { - if result != 0 { - // eprintln('Command failed with code ${result.exit_code}: ${command}\nOutput: ${result.output}') - exit(1) - } - // println(result.output) -} - // Map enum values to human readable step names fn get_step_name(step Command) string { return match step { @@ -101,6 +88,7 @@ fn get_step_name(step Command) string { .build_tetris_autofree { 'Build tetris with -autofree' } .build_blog_autofree { 'Build blog tutorial with -autofree' } .build_examples_prod { 'Build examples with -prod' } + .build_examples_v_compiled_with_tcc { 'Build examples with V build with tcc' } .v_doctor { 'v doctor' } .v_self_compilation_usecache { 'V self compilation with -usecache' } .v_self_compilation_parallel_cc { 'V self compilation with -parallel-cc' } @@ -110,6 +98,14 @@ fn get_step_name(step Command) string { } } +// Helper function to execute commands and exit if they fail +fn exec(command string) { + result := os.system(command) + if result != 0 { + exit(result) + } +} + // Step functions fn test_symlink() { exec('v symlink') @@ -160,6 +156,11 @@ fn build_examples() { exec('v build-examples') } +fn build_examples_v_compiled_with_tcc() { + exec('v -o vtcc -cc tcc cmd/v') + exec('./vtcc build-examples') // ensure that examples/veb/veb_example.v etc compiles +} + fn build_tetris_autofree() { exec('v -autofree -o tetris examples/tetris/tetris.v') }