From b103ce354fc7a7dcc5f3079cf1b4a14475a9e210 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Wed, 4 Dec 2024 09:11:21 -0300 Subject: [PATCH] ci: update compile_v_with_vtcc.sh, enable its CI task again (#23063) --- .github/workflows/compile_v_with_vtcc.sh | 19 +++++++++---------- .../v_apps_and_modules_compile_ci.yml | 6 +++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/compile_v_with_vtcc.sh b/.github/workflows/compile_v_with_vtcc.sh index 7ca66dffa6..9a68ba162e 100755 --- a/.github/workflows/compile_v_with_vtcc.sh +++ b/.github/workflows/compile_v_with_vtcc.sh @@ -14,27 +14,26 @@ show "Clone vtcc" du -s vtcc/ ## TODO: just `./v vtcc`, later will cause V, to detect the compiler as tcc (which it is), and add `-fwrapv`, which causes the vtcc compiler to panic currently show "Compile vtcc" -./v -o vtcc/xx vtcc/ -ls -la vtcc/xx -./vtcc/xx --version +cd vtcc/ +v run make.vsh +cd .. + +ls -la vtcc/vtcc +./vtcc/vtcc --version show "Generate the C file, for the current V version" ./v -o vlang.c cmd/v ls -la vlang.c show "Compile the C file with vtcc" -export tcclib=thirdparty/tcc/lib/tcc -export tccinc=$tcclib/include -./vtcc/xx -o v_compiled_with_vtcc vlang.c -L$tcclib -I$tccinc -lc -ldl -pthread -ltcc1 $tcclib/bt-log.o +./vtcc/vtcc -o v_compiled_with_vtcc vlang.c -lpthread ls -la v_compiled_with_vtcc show "Test the resulting V compiler" ./v_compiled_with_vtcc version -./v_compiled_with_vtcc -showcc run examples/hello_world.v -## TODO: this step passes locally, but fails on the main CI: -## show "Compile and run hello with vtcc" -## ./v_compiled_with_vtcc -showcc -cc ./vtcc/xx run examples/hello_world.v +show "Compile and run hello with vtcc" +./v_compiled_with_vtcc -cc vtcc/vtcc -showcc run examples/hello_world.v show "Remove the generated temporary files, so the script can be re-run cleanly" rm -rf v_compiled_with_vtcc vlang.c vtcc/ diff --git a/.github/workflows/v_apps_and_modules_compile_ci.yml b/.github/workflows/v_apps_and_modules_compile_ci.yml index 67ca33b697..ebf0eca4d4 100644 --- a/.github/workflows/v_apps_and_modules_compile_ci.yml +++ b/.github/workflows/v_apps_and_modules_compile_ci.yml @@ -46,9 +46,9 @@ jobs: v retry brew install sassc libgit2 fi - ## - name: Test vtcc - ## if: runner.os == 'Linux' - ## run: .github/workflows/compile_v_with_vtcc.sh + - name: Test vtcc + if: runner.os == 'Linux' + run: .github/workflows/compile_v_with_vtcc.sh - name: Test vsql compilation and examples if: ${{ !cancelled() && steps.build.outcome == 'success' }}