Add appveyor support for mingw64 builds

This commit is contained in:
James Rowe 2016-09-01 23:15:07 -06:00
parent 35a852ba53
commit 62def79e5a

View File

@ -2,6 +2,9 @@
clone_depth: 5 clone_depth: 5
environment: environment:
matrix:
- BUILD_TYPE: mingw
- BUILD_TYPE: msvc
BUILD_PASSWORD: BUILD_PASSWORD:
secure: EXGNlWKJsCtbeImEJ5EP9qrxZ+EqUFfNy+CP61nDOMA= secure: EXGNlWKJsCtbeImEJ5EP9qrxZ+EqUFfNy+CP61nDOMA=
@ -19,25 +22,63 @@ configuration:
install: install:
- git submodule update --init --recursive - git submodule update --init --recursive
- ps: >
if ($env:BUILD_TYPE -eq 'mingw') {
# redirect err to null to prevent warnings from becoming errors
# workaround for cyclical dependancies
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw64/mingw-w64-x86_64-freetype mingw64/mingw-w64-x86_64-fontconfig" 2> $null
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-qt5 mingw64/mingw-w64-x86_64-SDL2" 2> $null
}
before_build: before_build:
- mkdir build - mkdir %BUILD_TYPE%build
- cd build - cd %BUILD_TYPE%build
- cmake -G "Visual Studio 14 2015 Win64" -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 .. - ps: >
if ($env:BUILD_TYPE -eq 'msvc') {
cmake -G "Visual Studio 14 2015 Win64" -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 ..
} else {
$old_path = $env:Path
# Change path to just include the mingw gcc and *not* sh.exe (which breaks things when using MinGW Makefiles)
$env:Path = "C:\msys64\mingw64\bin\;"
# make sure error output from this command isn't interpreted as an error in powershell
C:\Windows\System32\cmd /c 'C:\msys64\mingw64\bin\cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5_DIR=C:/msys64/mingw64/qt5/lib/cmake/Qt5/ -DSDL2_INCLUDE_DIR=C:/msys64/mingw64/include/SDL2/ -DSDL2_LIBRARY=C:/msys64/mingw64/bin/SDL2.dll .. 2>&1'
$env:Path = $old_path
}
- cd .. - cd ..
build: build_script:
project: build/citra.sln - ps: >
parallel: true if ($env:BUILD_TYPE -eq 'msvc') {
# https://www.appveyor.com/docs/build-phase
msbuild msvcbuild/citra.sln /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
} else {
$env:Path = "C:\msys64\mingw64\bin\;" + $env:Path
C:\Windows\System32\cmd /c "C:\msys64\mingw64\bin\mingw32-make -C mingwbuild/ -j${env:NUMBER_OF_PROCESSORS} 2>&1"
}
test_script: test_script:
- cd build && ctest -VV -C Release && cd .. - cd %BUILD_TYPE%build && ctest -VV -C Release && cd ..
after_build:
- ps: >
if ($env:BUILD_TYPE -eq 'mingw') {
cmd /c "7z a citra.7z ${env:APPVEYOR_BUILD_FOLDER}\mingwbuild\src\citra\citra.exe ${env:APPVEYOR_BUILD_FOLDER}\mingwbuild\src\citra_qt\citra-qt.exe"
cd C:\msys64\mingw64\bin
cmd /c "7z a ${env:APPVEYOR_BUILD_FOLDER}\citra.7z Qt5Core.dll Qt5Widgets.dll Qt5Gui.dll Qt5OpenGL.dll"
cmd /c "7z a ${env:APPVEYOR_BUILD_FOLDER}\citra.7z libbz2-1.dll libicudt56.dll libicuin56.dll libicuuc56.dll libffi-6.dll libfreetype-6.dll libgcc_s_seh-1.dll libglib-2.0-0.dll libgobject-2.0-0.dll libgraphite2.dll libiconv-2.dll libharfbuzz-0.dll libintl-8.dll libpcre-1.dll libpcre16-0.dll libpng16-16.dll libstdc++-6.dll libwinpthread-1.dll SDL2.dll zlib1.dll"
cd C:\msys64\mingw64\share\qt5
cmd /c "7z a ${env:APPVEYOR_BUILD_FOLDER}\citra.7z plugins\platforms\qwindows.dll"
cd ${env:APPVEYOR_BUILD_FOLDER}
}
artifacts:
- path: citra.7z
name: CitraGCC
on_success: on_success:
# copying the needed QT Dlls is now done post build. See the CMakeLists.txt file in the citra-qt folder # copying the needed QT Dlls is now done post build. See the CMakeLists.txt file in the citra-qt folder
- ps: > - ps: >
if (!"$env:APPVEYOR_PULL_REQUEST_TITLE" -and ("$env:APPVEYOR_REPO_BRANCH" -eq "master")) if (!"$env:APPVEYOR_PULL_REQUEST_TITLE" -and ("$env:APPVEYOR_REPO_BRANCH" -eq "master")) {
{
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-","" $GITDATE = $(git show -s --date=short --format='%ad') -replace "-",""
$GITREV = $(git show -s --format='%h') $GITREV = $(git show -s --format='%h')
# Where are these spaces coming from? Regardless, let's remove them # Where are these spaces coming from? Regardless, let's remove them
@ -56,8 +97,6 @@ on_success:
7z a $BUILD_NAME .\build\bin\release\* .\license.txt .\README.md 7z a $BUILD_NAME .\build\bin\release\* .\license.txt .\README.md
# Do a second archive with only the binaries (excludes dlls) and documentation # Do a second archive with only the binaries (excludes dlls) and documentation
7z a $BUILD_NAME_NOQT .\build\bin\release\*.exe .\license.txt .\README.md 7z a $BUILD_NAME_NOQT .\build\bin\release\*.exe .\license.txt .\README.md
# Download WinSCP and upload to server # Download WinSCP and upload to server
choco install winscp.portable choco install winscp.portable
WinSCP.exe /command ` WinSCP.exe /command `
@ -68,4 +107,4 @@ on_success:
"put $BUILD_NAME_NOQT /citra/nightly/windows-noqt-amd64/" ` "put $BUILD_NAME_NOQT /citra/nightly/windows-noqt-amd64/" `
"put $BUILD_NAME_PDB /citra/nightly/windows-amd64-debugsymbols/" ` "put $BUILD_NAME_PDB /citra/nightly/windows-amd64-debugsymbols/" `
"exit" "exit"
} }