Skip to content

Commit b103ce3

Browse files
authored
ci: update compile_v_with_vtcc.sh, enable its CI task again (#23063)
1 parent 17f3c8f commit b103ce3

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

.github/workflows/compile_v_with_vtcc.sh

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,26 @@ show "Clone vtcc"
1414
du -s vtcc/
1515
## 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
1616
show "Compile vtcc"
17-
./v -o vtcc/xx vtcc/
18-
ls -la vtcc/xx
19-
./vtcc/xx --version
17+
cd vtcc/
18+
v run make.vsh
19+
cd ..
20+
21+
ls -la vtcc/vtcc
22+
./vtcc/vtcc --version
2023

2124
show "Generate the C file, for the current V version"
2225
./v -o vlang.c cmd/v
2326
ls -la vlang.c
2427

2528
show "Compile the C file with vtcc"
26-
export tcclib=thirdparty/tcc/lib/tcc
27-
export tccinc=$tcclib/include
28-
./vtcc/xx -o v_compiled_with_vtcc vlang.c -L$tcclib -I$tccinc -lc -ldl -pthread -ltcc1 $tcclib/bt-log.o
29+
./vtcc/vtcc -o v_compiled_with_vtcc vlang.c -lpthread
2930
ls -la v_compiled_with_vtcc
3031

3132
show "Test the resulting V compiler"
3233
./v_compiled_with_vtcc version
33-
./v_compiled_with_vtcc -showcc run examples/hello_world.v
3434

35-
## TODO: this step passes locally, but fails on the main CI:
36-
## show "Compile and run hello with vtcc"
37-
## ./v_compiled_with_vtcc -showcc -cc ./vtcc/xx run examples/hello_world.v
35+
show "Compile and run hello with vtcc"
36+
./v_compiled_with_vtcc -cc vtcc/vtcc -showcc run examples/hello_world.v
3837

3938
show "Remove the generated temporary files, so the script can be re-run cleanly"
4039
rm -rf v_compiled_with_vtcc vlang.c vtcc/

.github/workflows/v_apps_and_modules_compile_ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ jobs:
4646
v retry brew install sassc libgit2
4747
fi
4848
49-
## - name: Test vtcc
50-
## if: runner.os == 'Linux'
51-
## run: .github/workflows/compile_v_with_vtcc.sh
49+
- name: Test vtcc
50+
if: runner.os == 'Linux'
51+
run: .github/workflows/compile_v_with_vtcc.sh
5252

5353
- name: Test vsql compilation and examples
5454
if: ${{ !cancelled() && steps.build.outcome == 'success' }}

0 commit comments

Comments
 (0)