ignacio / lua-appveyor-example

For experiments with AppVeyor CI
MIT License
13 stars 8 forks source link

Select MSVC compiler. #10

Closed moteus closed 9 years ago

moteus commented 9 years ago

The code is some thing like

set PLATFORM=x86
set VC_VER=10.0

if not "%ProgramFiles (x86)%"=="" (
    call "%ProgramFiles (x86)%\Microsoft Visual Studio %VC_VER%\VC\vcvarsall.bat" %PLATFORM%
) else (
    call "%ProgramFiles%\Microsoft Visual Studio %VC_VER%\VC\vcvarsall.bat" %PLATFORM%
)

Tested on WinXP VC 9.0/10.0 (x86/x86_amd64)

ignacio commented 9 years ago

I'd gladly take a pull request for this. It seems to be solvable in the appveyor.yml itself.

Eventually, we'd also have to throw MinGW into the mix.

However, on Win7 x64, my VS2013 is installed in Program Files (x86) so the above logic does not work.

Shouldn't it be just

set VS_VER=10.0

call "%ProgramFiles(x86)%\Microsoft Visual Studio %VS_VER%\VC\vcvarsall.bat" %platform%

However, I'd wait to see how AppVeyor selects the different compiler versions. If it can be done just by choosing in the .yml file I would not do this.

ignacio commented 9 years ago

I'm working on this. I'll need to wait for a new LuaRocks release but since AppVeyor now has VS 2008, 2010, 2012, 2013, 2015 RC and MinGW 32 bits all rolled into the same image, I added a new dimension to the build matrix, so you can enable tests for any of those compilers.

ignacio commented 9 years ago

I've just pushed 407ba517a7f939998960f5e7ecfc0ab9f71dd242 which adds both compiler and platform as dimensions to the build matrix. Currently, the following compilers are supported:

Support for VS 2015 is currently disabled because the latest LuaRocks release (2.2.2) does not recognize it. If you need VS 2015, you need to set LUAROCKS_VER: HEAD in appveyor.yml.

I'm using the installed version of MinGW. Could not determine exactly which one. So, only 32 bit builds are possible. I may install mingw-w64 some day.

Also, some combinations of platform and compiler are expected to fail. Since AppVeyor does not support to exclude build jobs from the matrix as Travis-CI does, there are some hacks in place to allow the build to fail fast. It's not pretty, I don't like to see anything red in my builds :smile: , but we'll have to live with that until exclusions are supported.