1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: fix -usecache for programs using thirdparty C libs

This commit is contained in:
Delyan Angelov
2021-01-29 19:40:39 +02:00
parent 9f31829e0c
commit 8398e2f448
2 changed files with 23 additions and 6 deletions

View File

@@ -5,10 +5,10 @@ import term
import time
const (
vexe = os.getenv('VEXE')
vroot = os.dir(vexe)
vexe = os.getenv('VEXE')
vroot = os.dir(vexe)
args_string = os.args[1..].join(' ')
vargs = args_string.all_before('test-all')
vargs = args_string.all_before('test-all')
)
fn main() {
@@ -49,6 +49,14 @@ mut:
fn get_all_commands() []Command {
mut res := []Command{}
res << Command{
line: '$vexe examples/hello_world.v'
okmsg: 'V can compile hello world.'
}
res << Command{
line: '$vexe -o vtmp cmd/v'
okmsg: 'V can compile itself.'
}
res << Command{
line: '$vexe $vargs -progress test-cleancode'
okmsg: 'All important .v files are invariant when processed with `v fmt`'
@@ -78,6 +86,13 @@ fn get_all_commands() []Command {
line: '$vexe install nedpals.args'
okmsg: '`v install` works.'
}
// NB: test that a program that depends on thirdparty libraries with its
// own #flags (tetris depends on gg, which uses sokol) can be compiled
// with -usecache:
res << Command{
line: '$vexe -usecache examples/tetris/tetris.v'
okmsg: '`v -usecache` works.'
}
$if macos {
res << Command{
line: '$vexe -o v.c cmd/v && cc -Werror v.c && rm -rf v.c'