travis: spawn 2 separate windows instances

pull/1947/head
Delyan Angelov 2019-09-15 15:52:12 +03:00 committed by Alexander Medvednikov
parent 3e923871cf
commit e3bd72e8e2
3 changed files with 32 additions and 13 deletions

View File

@ -2,6 +2,7 @@ language: c
matrix:
include:
- os: linux
name: "linux"
dist: xenial
sudo: required
addons:
@ -17,9 +18,15 @@ matrix:
- libfreetype6-dev
- libssl-dev
- os: windows
language: sh
name: "windows_gcc"
language: bash
filter_secrets: false
- os: windows
name: "windows_msvc"
language: bash
filter_secrets: false
- os: osx
name: "osx"
osx_image: xcode10.3
addons:
homebrew:
@ -38,10 +45,21 @@ script:
fi
- |
if [[ "${TRAVIS_OS_NAME}" == "windows" ]]; then
### troubleshooting and diagnostics: show ALL environment variables in the instance
#set
set -e
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
./v2.exe -o v3.exe compiler
./v3.exe -o v4.exe compiler
@ -49,20 +67,17 @@ script:
ls -la v2.exe
ls -la v3.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
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
fi
- |
if [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then
make
#./v install glfw
./v test v
fi
- |

View File

@ -64,8 +64,9 @@ CommonCHeaders = '
#define _Atomic volatile
// MSVC cannot parse some things properly
//#undef EMPTY_STRUCT_DECLARATION
//#define EMPTY_STRUCT_DECLARATION void *____dummy_variable
#undef EMPTY_STRUCT_DECLARATION
#define EMPTY_STRUCT_DECLARATION void *____dummy_variable
#undef OPTION_CAST
#define OPTION_CAST(x)
#endif

View File

@ -329,6 +329,9 @@ fn (p mut Parser) gen_struct_init(typ string, t Type) bool {
}
else {
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 {