2015-01-11 23:59:39 +05:30
|
|
|
# shallow clone
|
2016-11-20 01:41:49 +05:30
|
|
|
clone_depth: 10
|
2015-01-11 23:03:44 +05:30
|
|
|
|
2016-08-29 18:49:50 +05:30
|
|
|
cache:
|
|
|
|
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
|
|
|
- C:\ProgramData\chocolatey\lib -> appveyor.yml
|
|
|
|
|
2017-05-22 04:26:25 +05:30
|
|
|
os: Visual Studio 2017
|
2016-01-05 04:25:53 +05:30
|
|
|
|
2017-08-31 07:09:24 +05:30
|
|
|
environment:
|
|
|
|
# Tell msys2 to add mingw64 to the path
|
|
|
|
MSYSTEM: MINGW64
|
|
|
|
# Tell msys2 to inherit the current directory when starting the shell
|
|
|
|
CHERE_INVOKING: 1
|
|
|
|
matrix:
|
|
|
|
- BUILD_TYPE: mingw
|
|
|
|
- BUILD_TYPE: msvc
|
|
|
|
|
2015-01-15 11:37:18 +05:30
|
|
|
platform:
|
2015-02-08 19:53:33 +05:30
|
|
|
- x64
|
2015-01-15 11:37:18 +05:30
|
|
|
|
|
|
|
configuration:
|
|
|
|
- Release
|
2015-01-11 23:03:44 +05:30
|
|
|
|
|
|
|
install:
|
2015-07-08 00:52:26 +05:30
|
|
|
- git submodule update --init --recursive
|
2017-08-31 07:09:24 +05:30
|
|
|
- ps: |
|
|
|
|
if ($env:BUILD_TYPE -eq 'mingw') {
|
2018-12-10 02:55:45 +05:30
|
|
|
$dependencies = "mingw64/mingw-w64-x86_64-qt5 mingw64/mingw-w64-x86_64-ffmpeg"
|
2017-08-31 07:09:24 +05:30
|
|
|
# redirect err to null to prevent warnings from becoming errors
|
|
|
|
# workaround to prevent pacman from failing due to cyclical dependencies
|
|
|
|
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw64/mingw-w64-x86_64-freetype mingw64/mingw-w64-x86_64-fontconfig" 2> $null
|
2017-10-24 23:39:41 +05:30
|
|
|
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -U http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-SDL2-2.0.5-2-any.pkg.tar.xz" 2> $null
|
2017-08-31 07:09:24 +05:30
|
|
|
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S $dependencies" 2> $null
|
2018-06-09 06:41:59 +05:30
|
|
|
# freeze the cmake to a stable version, on version < 3.9.6 cmake may generate a Makefile links against gcc_eh instead of gcc_s_eh
|
|
|
|
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -U http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-cmake-3.11.1-2-any.pkg.tar.xz" 2> $null
|
2017-08-31 07:09:24 +05:30
|
|
|
}
|
2015-01-11 23:03:44 +05:30
|
|
|
|
|
|
|
before_build:
|
2017-08-31 07:09:24 +05:30
|
|
|
- mkdir %BUILD_TYPE%_build
|
|
|
|
- cd %BUILD_TYPE%_build
|
|
|
|
- ps: |
|
2018-01-02 06:55:38 +05:30
|
|
|
$COMPAT = if ($env:ENABLE_COMPATIBILITY_REPORTING -eq $null) {0} else {$env:ENABLE_COMPATIBILITY_REPORTING}
|
2017-08-31 07:09:24 +05:30
|
|
|
if ($env:BUILD_TYPE -eq 'msvc') {
|
|
|
|
# redirect stderr and change the exit code to prevent powershell from cancelling the build if cmake prints a warning
|
2018-12-16 19:33:23 +05:30
|
|
|
cmd /C 'cmake -G "Visual Studio 15 2017 Win64" -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG=ON .. 2>&1 && exit 0'
|
2017-08-31 07:09:24 +05:30
|
|
|
} else {
|
2018-12-16 19:33:23 +05:30
|
|
|
C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG=ON .. 2>&1"
|
2017-08-31 07:09:24 +05:30
|
|
|
}
|
2015-01-11 23:03:44 +05:30
|
|
|
- cd ..
|
2015-01-24 21:15:06 +05:30
|
|
|
|
2017-08-31 07:09:24 +05:30
|
|
|
build_script:
|
|
|
|
- ps: |
|
|
|
|
if ($env:BUILD_TYPE -eq 'msvc') {
|
|
|
|
# https://www.appveyor.com/docs/build-phase
|
|
|
|
msbuild msvc_build/citra.sln /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
|
|
|
} else {
|
2018-04-01 04:00:02 +05:30
|
|
|
C:\msys64\usr\bin\bash.exe -lc 'mingw32-make -j4 -C mingw_build/ 2>&1'
|
2017-08-31 07:09:24 +05:30
|
|
|
}
|
2016-03-20 20:28:24 +05:30
|
|
|
|
2016-11-20 01:41:49 +05:30
|
|
|
after_build:
|
|
|
|
- ps: |
|
|
|
|
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-",""
|
|
|
|
$GITREV = $(git show -s --format='%h')
|
2017-07-27 09:59:33 +05:30
|
|
|
|
2017-08-10 09:47:27 +05:30
|
|
|
# Find out which kind of release we are producing by tag name
|
|
|
|
if ($env:APPVEYOR_REPO_TAG_NAME) {
|
2017-08-31 07:09:24 +05:30
|
|
|
$RELEASE_DIST, $RELEASE_VERSION = $env:APPVEYOR_REPO_TAG_NAME.split('-')
|
2017-08-10 09:47:27 +05:30
|
|
|
} else {
|
2017-08-31 07:09:24 +05:30
|
|
|
# There is no repo tag - make assumptions
|
|
|
|
$RELEASE_DIST = "head"
|
2017-08-10 09:47:27 +05:30
|
|
|
}
|
2017-07-27 09:59:33 +05:30
|
|
|
|
2017-08-31 07:09:24 +05:30
|
|
|
if ($env:BUILD_TYPE -eq 'msvc') {
|
|
|
|
# Where are these spaces coming from? Regardless, let's remove them
|
|
|
|
$MSVC_BUILD_ZIP = "citra-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
|
|
|
|
$MSVC_BUILD_PDB = "citra-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
|
|
|
|
$MSVC_SEVENZIP = "citra-windows-msvc-$GITDATE-$GITREV.7z" -replace " ", ""
|
|
|
|
|
|
|
|
# set the build names as env vars so the artifacts can upload them
|
|
|
|
$env:BUILD_ZIP = $MSVC_BUILD_ZIP
|
|
|
|
$env:BUILD_SYMBOLS = $MSVC_BUILD_PDB
|
|
|
|
$env:BUILD_UPDATE = $MSVC_SEVENZIP
|
|
|
|
|
|
|
|
mkdir $RELEASE_DIST
|
|
|
|
Copy-Item .\msvc_build\bin\release\* -Destination $RELEASE_DIST -Recurse
|
|
|
|
Copy-Item .\license.txt -Destination $RELEASE_DIST
|
|
|
|
Copy-Item .\README.md -Destination $RELEASE_DIST
|
2017-12-02 00:29:56 +05:30
|
|
|
|
|
|
|
# process PDBs
|
|
|
|
. "./.appveyor/ProcessPdb.ps1"
|
|
|
|
7z a -tzip $MSVC_BUILD_PDB $RELEASE_DIST\*.pdb
|
|
|
|
rm $RELEASE_DIST\*.pdb
|
|
|
|
|
2017-08-31 07:09:24 +05:30
|
|
|
7z a -tzip $MSVC_BUILD_ZIP $RELEASE_DIST\*
|
|
|
|
7z a $MSVC_SEVENZIP $RELEASE_DIST
|
|
|
|
} else {
|
|
|
|
$MINGW_BUILD_ZIP = "citra-windows-mingw-$GITDATE-$GITREV.zip" -replace " ", ""
|
2017-12-02 00:29:56 +05:30
|
|
|
$MINGW_BUILD_PDB = "citra-windows-mingw-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
|
2017-08-31 07:09:24 +05:30
|
|
|
$MINGW_SEVENZIP = "citra-windows-mingw-$GITDATE-$GITREV.7z" -replace " ", ""
|
|
|
|
|
|
|
|
# store the build information in env vars so we can use them as artifacts
|
|
|
|
$env:BUILD_ZIP = $MINGW_BUILD_ZIP
|
2017-12-02 00:29:56 +05:30
|
|
|
$env:BUILD_SYMBOLS = $MINGW_BUILD_PDB
|
2017-08-31 07:09:24 +05:30
|
|
|
$env:BUILD_UPDATE = $MINGW_SEVENZIP
|
|
|
|
|
|
|
|
$CMAKE_SOURCE_DIR = "$env:APPVEYOR_BUILD_FOLDER"
|
|
|
|
$CMAKE_BINARY_DIR = "$CMAKE_SOURCE_DIR/mingw_build"
|
|
|
|
$RELEASE_DIST = $RELEASE_DIST + "-mingw"
|
|
|
|
|
|
|
|
mkdir $RELEASE_DIST
|
|
|
|
mkdir $RELEASE_DIST/platforms
|
2018-05-11 23:12:23 +05:30
|
|
|
mkdir $RELEASE_DIST/mediaservice
|
2018-05-06 10:09:07 +05:30
|
|
|
mkdir $RELEASE_DIST/styles
|
2018-06-28 20:23:23 +05:30
|
|
|
mkdir $RELEASE_DIST/imageformats
|
2017-08-31 07:09:24 +05:30
|
|
|
|
|
|
|
# copy the compiled binaries and other release files to the release folder
|
|
|
|
Get-ChildItem "$CMAKE_BINARY_DIR" -Recurse -Filter "citra*.exe" | Copy-Item -destination $RELEASE_DIST
|
|
|
|
Copy-Item -path "$CMAKE_SOURCE_DIR/license.txt" -destination $RELEASE_DIST
|
|
|
|
Copy-Item -path "$CMAKE_SOURCE_DIR/README.md" -destination $RELEASE_DIST
|
2017-10-24 02:46:36 +05:30
|
|
|
|
2017-08-31 07:09:24 +05:30
|
|
|
# copy the qt windows plugin dll to platforms
|
|
|
|
Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/platforms/qwindows.dll" -force -destination "$RELEASE_DIST/platforms"
|
|
|
|
|
2018-05-11 23:12:23 +05:30
|
|
|
# copy the qt mediaservice plugin dll
|
|
|
|
Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/mediaservice/dsengine.dll" -force -destination "$RELEASE_DIST/mediaservice"
|
|
|
|
|
2018-05-06 10:09:07 +05:30
|
|
|
# copy the qt windows vista style dll to platforms
|
|
|
|
Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/styles/qwindowsvistastyle.dll" -force -destination "$RELEASE_DIST/styles"
|
|
|
|
|
2018-06-28 20:23:23 +05:30
|
|
|
# copy the qt imageformats plugin dlls to imageformats
|
|
|
|
Get-ChildItem "C:/msys64/mingw64/share/qt5/plugins/imageformats" -Exclude "*d.dll" | Copy-Item -force -destination "$RELEASE_DIST/imageformats"
|
|
|
|
|
2018-11-16 11:23:40 +05:30
|
|
|
# copy all the dll dependencies to the release folder
|
|
|
|
. "./.appveyor/FindDependencies.ps1"
|
|
|
|
$DLLSearchPath = "C:\msys64\mingw64\bin;$env:PATH"
|
|
|
|
$MingwDLLs = RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\citra.exe"
|
|
|
|
$MingwDLLs += RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\citra-qt.exe"
|
|
|
|
$MingwDLLs += RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\imageformats\qjpeg.dll"
|
|
|
|
Write-Host "Detected the following dependencies:"
|
|
|
|
Write-Host $MingwDLLs
|
|
|
|
foreach ($file in $MingwDLLs) {
|
|
|
|
Copy-Item -path "$file" -force -destination "$RELEASE_DIST"
|
|
|
|
}
|
|
|
|
|
2017-12-02 00:29:56 +05:30
|
|
|
# process PDBs
|
|
|
|
. "./.appveyor/ProcessPdb.ps1"
|
|
|
|
7z a -tzip $MINGW_BUILD_PDB $RELEASE_DIST\*.pdb
|
|
|
|
rm $RELEASE_DIST\*.pdb
|
|
|
|
|
2017-08-31 07:09:24 +05:30
|
|
|
7z a -tzip $MINGW_BUILD_ZIP $RELEASE_DIST\*
|
|
|
|
7z a $MINGW_SEVENZIP $RELEASE_DIST
|
|
|
|
}
|
2016-09-01 22:17:31 +05:30
|
|
|
|
2016-11-20 01:41:49 +05:30
|
|
|
test_script:
|
2017-08-31 07:09:24 +05:30
|
|
|
- cd %BUILD_TYPE%_build
|
|
|
|
- ps: |
|
|
|
|
if ($env:BUILD_TYPE -eq 'msvc') {
|
|
|
|
ctest -VV -C Release
|
|
|
|
} else {
|
|
|
|
C:\msys64\usr\bin\bash.exe -lc "ctest -VV -C Release"
|
|
|
|
}
|
|
|
|
- cd ..
|
2015-05-26 00:04:09 +05:30
|
|
|
|
2016-11-20 01:41:49 +05:30
|
|
|
artifacts:
|
2017-08-31 07:09:24 +05:30
|
|
|
- path: $(BUILD_ZIP)
|
|
|
|
name: build
|
2016-11-20 01:41:49 +05:30
|
|
|
type: zip
|
2017-08-31 07:09:24 +05:30
|
|
|
- path: $(BUILD_SYMBOLS)
|
|
|
|
name: debugsymbols
|
|
|
|
- path: $(BUILD_UPDATE)
|
|
|
|
name: update
|
2015-05-26 00:04:09 +05:30
|
|
|
|
2017-11-17 07:13:06 +05:30
|
|
|
notifications:
|
|
|
|
- provider: Webhook
|
|
|
|
url: https://api.citra-emu.org/code/appveyor/notify
|