diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0912f3cd8..73af725dbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,6 +93,9 @@ jobs: # ./v -silent test-compiler - name: v self compilation run: ./v -o v2 cmd/v && ./v2 -o v3 cmd/v && ./v3 -o v4 cmd/v + - name: v doctor + run: | + ./v doctor - name: Fixed tests run: ./v -silent test-fixed - name: Test time functions in a timezone UTC-12 @@ -105,13 +108,12 @@ jobs: run: TZ=Etc/GMT-12 ./v test vlib/time/ - name: Test time functions in a timezone using daylight saving (Europe/Paris) run: TZ=Europe/Paris ./v test vlib/time/ + - name: Build examples + run: ./v build-examples - name: Test building v tools run: ./v -silent build-tools - - name: v doctor - run: | - ./v doctor - name: Test v binaries - run: ./v -silent build-vbinaries + run: ./v build-vbinaries # Alpine docker pre-built container alpine-docker-musl-gcc: @@ -176,7 +178,7 @@ jobs: # - name: Test v->c # run: ./v -silent test-compiler # - name: Test v binaries -# run: ./v -silent build-vbinaries +# run: ./v build-vbinaries ## - name: Test v->js ## run: ./v -o hi.js examples/hello_v_js.v && node hi.js - name: Fixed tests @@ -241,7 +243,7 @@ jobs: # - name: Test V # run: ./v -silent test-compiler # - name: Test v binaries -# run: ./v -silent build-vbinaries +# run: ./v build-vbinaries ## - name: Test v->js ## run: ./v -o hi.js examples/hello_v_js.v && node hi.js # - name: Build Vorum @@ -432,7 +434,7 @@ jobs: # - name: Build v # run: echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v # # - name: Test v binaries -# # run: ./v -silent build-vbinaries +# # run: ./v build-vbinaries # ## - name: Test v->js # ## run: ./v -o hi.js examples/hello_v_js.v && node hi.js # - name: quick debug @@ -479,7 +481,7 @@ jobs: #.\v.exe -o hi.js examples/hello_v_js.v #node hi.js # - name: Test v binaries -# run: ./v -silent build-vbinaries +# run: ./v build-vbinaries # - name: v2 self compilation # run: .\v.exe -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v @@ -504,13 +506,15 @@ jobs: .\v.exe setup-freetype .\.github\workflows\windows-install-sqlite.bat ## .\.github\workflows\windows-install-sdl.bat + - name: v doctor + run: | + ./v doctor - name: Fixed tests run: | ./v -cg cmd\tools\vtest-fixed.v ./v -silent test-fixed - - name: v doctor - run: | - ./v doctor + - name: Build examples + run: ./v build-examples # - name: Test # run: | # .\v.exe -silent test-compiler @@ -518,7 +522,7 @@ jobs: #.\v.exe -o hi.js examples/hello_v_js.v #node hi.js # - name: Test v binaries -# run: ./v -silent build-vbinaries +# run: ./v build-vbinaries windows-tcc: runs-on: windows-2019 @@ -547,7 +551,7 @@ jobs: #.\v.exe -o hi.js examples/hello_v_js.v #node hi.js # - name: Test v binaries -# run: ./v -silent build-vbinaries +# run: ./v build-vbinaries # - name: v2 self compilation # run: .\v.exe -o v2.exe cmd/v && .\v2.exe -o v3.exe cmd/v diff --git a/cmd/tools/modules/testing/common.v b/cmd/tools/modules/testing/common.v index e35c208a96..93f87f9222 100644 --- a/cmd/tools/modules/testing/common.v +++ b/cmd/tools/modules/testing/common.v @@ -110,6 +110,9 @@ pub fn new_test_session(_vargs string) TestSession { skip_files << 'examples/sokol/fonts.v' skip_files << 'examples/sokol/drawing.v' } + $if windows { + skip_files << 'examples/x/websocket/ping.v' // requires OpenSSL + } vargs := _vargs.replace('-progress', '').replace('-progress', '') vexe := pref.vexe_path() new_vtmp_dir := setup_new_vtmp_folder() @@ -164,14 +167,10 @@ pub fn (mut ts TestSession) test() { } remaining_files << dot_relative_file } - remaining_files = vtest.filter_vtest_only(remaining_files, { - fix_slashes: false - }) + remaining_files = vtest.filter_vtest_only(remaining_files, fix_slashes: false) ts.files = remaining_files ts.benchmark.set_total_expected_steps(remaining_files.len) - mut pool_of_test_runners := sync.new_pool_processor({ - callback: worker_trunner - }) + mut pool_of_test_runners := sync.new_pool_processor(callback: worker_trunner) // for handling messages across threads ts.nmessages = chan LogMessage{cap: 10000} ts.nprint_ended = chan int{cap: 0} @@ -314,9 +313,7 @@ pub fn prepare_test_session(zargs string, folder string, oskipped []string, main continue } } - c := os.read_file(f) or { - panic(err) - } + c := os.read_file(f) or { panic(err) } maxc := if c.len > 300 { 300 } else { c.len } start := c[0..maxc] if start.contains('module ') && !start.contains('module main') { @@ -341,9 +338,7 @@ pub fn v_build_failing_skipped(zargs string, folder string, oskipped []string) b } pub fn build_v_cmd_failed(cmd string) bool { - res := os.exec(cmd) or { - return true - } + res := os.exec(cmd) or { return true } if res.exit_code != 0 { eprintln('') eprintln(res.output)