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