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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user