mirror of
https://github.com/GerbilSoft/rom-properties.git
synced 2025-06-18 11:35:38 -04:00
appveyor.yml, appveyor.cmd: Initial attempt to add support for MinGW-w64 on AppVeyor.
This uses a new matrix configuration with platform, configuration, and compiler. Note that we're only testing debug builds with MinGW-w64 for now. Notes: - git has to be removed from the path. Otherwise, cmake thinks that it's running from a UNIX shell, which requires MSYS Makefiles. - Reference: https://help.appveyor.com/discussions/problems/3193-cmake-building-for-mingw-issue-with-git-shexe - Note that git is 64-bit in AppVeyor now, and sh is in usr/bin/. I'm checking for all four configurations. - Build in a build/ subdirectory in all configurations. - MSVC configurations are temporarily disabled so we can fix all MinGW-w64 issues without having to wait for the MSVC builds to finish. - The VS2013 image has MinGW-w64 x86_64 7.2.0, not 8.1.0. The AppVeyor documentation is incorrect.
This commit is contained in:
parent
c6723d5fba
commit
a022658de1
34
appveyor.cmd
34
appveyor.cmd
@ -1,7 +1,31 @@
|
||||
@ECHO OFF
|
||||
cmake --version
|
||||
IF "%PLATFORM%" == "x64" (
|
||||
cmake . -G "Visual Studio 12 2013 Win64" -DCMAKE_GENERATOR_TOOLSET=v120_xp -DENABLE_JPEG=ON -DBUILD_TESTING=ON -DENABLE_LTO=OFF -DENABLE_PCH=ON
|
||||
) ELSE (
|
||||
cmake . -G "Visual Studio 12 2013" -DCMAKE_GENERATOR_TOOLSET=v120_xp -DENABLE_JPEG=ON -DBUILD_TESTING=ON -DENABLE_LTO=OFF -DENABLE_PCH=ON
|
||||
)
|
||||
|
||||
if "%compiler%" == "msvc2013" goto :msvc2013
|
||||
if "%compiler%" == "mingw-w64" goto :mingw-w64
|
||||
echo *** ERROR: Unsupported compiler '%compiler%'.
|
||||
exit /b 1
|
||||
|
||||
:msvc2013
|
||||
set PreferredToolArchitecture=x64
|
||||
set "CMAKE_GENERATOR=Visual Studio 12 2013"
|
||||
set CMAKE_GENERATOR_TOOLSET=v120_xp
|
||||
if "%platform%" == "x64" set "CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64"
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "%CMAKE_GENERATOR%" -DCMAKE_GENERATOR_TOOLSET=%CMAKE_GENERATOR_TOOLSET% -DENABLE_JPEG=ON -DBUILD_TESTING=ON -DENABLE_LTO=OFF -DENABLE_PCH=ON
|
||||
exit /b %ERRORLEVEL%
|
||||
|
||||
:mingw-w64
|
||||
set PATH=%PATH:C:\Program Files\Git\bin;=%
|
||||
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
|
||||
set PATH=%PATH:C:\Program Files (x86)\Git\bin;=%
|
||||
set PATH=%PATH:C:\Program Files (x86)\Git\usr\bin;=%
|
||||
if "%platform%" == "x86" set MINGW64_ROOT=C:/mingw-w64/i686-6.3.0-posix-dwarf-rt_v5-rev1/mingw32
|
||||
if "%platform%" == "x64" set MINGW64_ROOT=C:/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64
|
||||
set "PATH=%MINGW64_ROOT%\bin;%PATH%"
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH=%MINGW64_ROOT% -DCMAKE_C_COMPILER=%MINGW64_ROOT%/bin/gcc.exe -DCMAKE_CXX_COMPILER=%MINGW64_ROOT%/bin/g++.exe -DCMAKE_BUILD_TYPE=%configuration% -DENABLE_JPEG=ON -DBUILD_TESTING=ON -DENABLE_LTO=OFF -DENABLE_PCH=ON
|
||||
exit /b %ERRORLEVEL%
|
||||
|
38
appveyor.yml
38
appveyor.yml
@ -22,13 +22,31 @@ only_commits:
|
||||
- extlib/**/*
|
||||
- src/**/*
|
||||
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
environment:
|
||||
matrix:
|
||||
#- platform: x86
|
||||
# configuration: Debug
|
||||
# compiler: msvc2013
|
||||
|
||||
configuration:
|
||||
- Debug
|
||||
- Release
|
||||
#- platform: x86
|
||||
# configuration: Release
|
||||
# compiler: msvc2013
|
||||
|
||||
#- platform: x64
|
||||
# configuration: Debug
|
||||
# compiler: msvc2013
|
||||
|
||||
#- platform: x64
|
||||
# configuration: Release
|
||||
# compiler: msvc2013
|
||||
|
||||
- platform: x86
|
||||
configuration: Debug
|
||||
compiler: mingw-w64
|
||||
|
||||
- platform: x64
|
||||
configuration: Debug
|
||||
compiler: mingw-w64
|
||||
|
||||
# Run CMake.
|
||||
before_build:
|
||||
@ -36,11 +54,11 @@ before_build:
|
||||
- appveyor.cmd
|
||||
|
||||
build_script:
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- msbuild ALL_BUILD.vcxproj
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\build
|
||||
- cmake --build . --config %configuration%
|
||||
|
||||
test_script:
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- ctest -V -C %CONFIGURATION%
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\build
|
||||
- ctest -V -C %configuration%
|
||||
|
||||
# TODO: Automatic packaging?
|
||||
|
Loading…
Reference in New Issue
Block a user