# shallow clone clone_depth: 5 environment: matrix: - BUILD_TYPE: mingw - BUILD_TYPE: msvc BUILD_PASSWORD: secure: EXGNlWKJsCtbeImEJ5EP9qrxZ+EqUFfNy+CP61nDOMA= cache: - C:\ProgramData\chocolatey\bin -> appveyor.yml - C:\ProgramData\chocolatey\lib -> appveyor.yml os: Visual Studio 2015 platform: - x64 configuration: - Release install: - 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: - mkdir %BUILD_TYPE%build - cd %BUILD_TYPE%build - 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 .. build_script: - ps: > 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: - 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: # copying the needed QT Dlls is now done post build. See the CMakeLists.txt file in the citra-qt folder - ps: > if (!"$env:APPVEYOR_PULL_REQUEST_TITLE" -and ("$env:APPVEYOR_REPO_BRANCH" -eq "master")) { $GITDATE = $(git show -s --date=short --format='%ad') -replace "-","" $GITREV = $(git show -s --format='%h') # Where are these spaces coming from? Regardless, let's remove them $BUILD_NAME = "citra-${GITDATE}-${GITREV}-windows-amd64.7z" -replace " ","" $BUILD_NAME_PDB = "citra-${GITDATE}-${GITREV}-windows-amd64-debugsymbols.7z" -replace " ","" $BUILD_NAME_NOQT = "citra-noqt-${GITDATE}-${GITREV}-windows-amd64.7z" -replace " ","" # Remove unnecessary files rm .\build\bin\release\*tests* # Put the pdb files in a separate archive and remove them from the main download 7z a $BUILD_NAME_PDB .\build\bin\release\*.pdb rm .\build\bin\release\*.pdb # Zip up the build folder and documentation 7z a $BUILD_NAME .\build\bin\release\* .\license.txt .\README.md # 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 # Download WinSCP and upload to server choco install winscp.portable WinSCP.exe /command ` "option batch abort" ` "option confirm off" ` "open sftp://citra-builds:${env:BUILD_PASSWORD}@builds.citra-emu.org -hostkey=*" ` "put $BUILD_NAME /citra/nightly/windows-amd64/" ` "put $BUILD_NAME_NOQT /citra/nightly/windows-noqt-amd64/" ` "put $BUILD_NAME_PDB /citra/nightly/windows-amd64-debugsymbols/" ` "exit" }