mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
travis: spawn 2 separate windows instances
This commit is contained in:
parent
3e923871cf
commit
e3bd72e8e2
37
.travis.yml
37
.travis.yml
@ -2,6 +2,7 @@ language: c
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
|
name: "linux"
|
||||||
dist: xenial
|
dist: xenial
|
||||||
sudo: required
|
sudo: required
|
||||||
addons:
|
addons:
|
||||||
@ -17,9 +18,15 @@ matrix:
|
|||||||
- libfreetype6-dev
|
- libfreetype6-dev
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- os: windows
|
- os: windows
|
||||||
language: sh
|
name: "windows_gcc"
|
||||||
|
language: bash
|
||||||
|
filter_secrets: false
|
||||||
|
- os: windows
|
||||||
|
name: "windows_msvc"
|
||||||
|
language: bash
|
||||||
filter_secrets: false
|
filter_secrets: false
|
||||||
- os: osx
|
- os: osx
|
||||||
|
name: "osx"
|
||||||
osx_image: xcode10.3
|
osx_image: xcode10.3
|
||||||
addons:
|
addons:
|
||||||
homebrew:
|
homebrew:
|
||||||
@ -38,10 +45,21 @@ script:
|
|||||||
fi
|
fi
|
||||||
- |
|
- |
|
||||||
if [[ "${TRAVIS_OS_NAME}" == "windows" ]]; then
|
if [[ "${TRAVIS_OS_NAME}" == "windows" ]]; then
|
||||||
|
### troubleshooting and diagnostics: show ALL environment variables in the instance
|
||||||
|
#set
|
||||||
set -e
|
set -e
|
||||||
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries thirdparty/freetype/
|
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries thirdparty/freetype/
|
||||||
echo "Just running ./make.bat to produce v.exe"
|
|
||||||
./make.bat
|
if [[ "${TRAVIS_JOB_NAME}" == "windows_gcc" ]]; then
|
||||||
|
echo "Building V with GCC"
|
||||||
|
export VFLAGS="-os windows"
|
||||||
|
./make.bat -gcc
|
||||||
|
fi
|
||||||
|
if [[ "${TRAVIS_JOB_NAME}" == "windows_msvc" ]]; then
|
||||||
|
echo "Building V with MSVC"
|
||||||
|
export VFLAGS="-os msvc"
|
||||||
|
./make.bat -msvc
|
||||||
|
fi
|
||||||
./v.exe -o v2.exe compiler
|
./v.exe -o v2.exe compiler
|
||||||
./v2.exe -o v3.exe compiler
|
./v2.exe -o v3.exe compiler
|
||||||
./v3.exe -o v4.exe compiler
|
./v3.exe -o v4.exe compiler
|
||||||
@ -49,20 +67,17 @@ script:
|
|||||||
ls -la v2.exe
|
ls -la v2.exe
|
||||||
ls -la v3.exe
|
ls -la v3.exe
|
||||||
ls -la v4.exe
|
ls -la v4.exe
|
||||||
echo "Running v test v..."
|
|
||||||
|
### running just repl_test.v produces failing results earlier and is easier to read
|
||||||
|
echo "Running only the repl tests directly..."
|
||||||
|
./v.exe ./compiler/tests/repl/repl_test.v
|
||||||
|
echo "Running ALL tests..."
|
||||||
./v.exe test v
|
./v.exe test v
|
||||||
echo "Running v -os msvc test v..."
|
|
||||||
#./v -os msvc test v
|
|
||||||
##echo "Running only the repl tests directly"
|
|
||||||
##./v.exe ./compiler/tests/repl/repl_test.v
|
|
||||||
echo "Testing gcc bootstrapping"
|
|
||||||
./make.bat -gcc
|
|
||||||
set +e
|
set +e
|
||||||
fi
|
fi
|
||||||
- |
|
- |
|
||||||
if [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then
|
if [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then
|
||||||
make
|
make
|
||||||
#./v install glfw
|
|
||||||
./v test v
|
./v test v
|
||||||
fi
|
fi
|
||||||
- |
|
- |
|
||||||
|
@ -64,8 +64,9 @@ CommonCHeaders = '
|
|||||||
#define _Atomic volatile
|
#define _Atomic volatile
|
||||||
|
|
||||||
// MSVC cannot parse some things properly
|
// MSVC cannot parse some things properly
|
||||||
//#undef EMPTY_STRUCT_DECLARATION
|
#undef EMPTY_STRUCT_DECLARATION
|
||||||
//#define EMPTY_STRUCT_DECLARATION void *____dummy_variable
|
#define EMPTY_STRUCT_DECLARATION void *____dummy_variable
|
||||||
|
|
||||||
#undef OPTION_CAST
|
#undef OPTION_CAST
|
||||||
#define OPTION_CAST(x)
|
#define OPTION_CAST(x)
|
||||||
#endif
|
#endif
|
||||||
|
@ -329,6 +329,9 @@ fn (p mut Parser) gen_struct_init(typ string, t Type) bool {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
p.gen('($typ) {')
|
p.gen('($typ) {')
|
||||||
|
if t.fields.len == 1 && t.fields[0].name == '' && t.fields[0].typ.starts_with('EMPTY_STRUCT_DECLARATION') {
|
||||||
|
p.gen(' 0 /* v empty struct initialization */ ')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user