2015-01-11 19:29:39 +01:00
|
|
|
# shallow clone
|
2016-11-19 21:11:49 +01:00
|
|
|
clone_depth: 10
|
2015-01-11 18:33:44 +01:00
|
|
|
|
2016-08-29 15:19:50 +02:00
|
|
|
cache:
|
|
|
|
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
|
|
|
- C:\ProgramData\chocolatey\lib -> appveyor.yml
|
|
|
|
|
2017-05-22 00:56:25 +02:00
|
|
|
os: Visual Studio 2017
|
2016-01-04 23:55:53 +01:00
|
|
|
|
2017-08-31 03:39:24 +02:00
|
|
|
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 07:07:18 +01:00
|
|
|
platform:
|
2015-02-08 15:23:33 +01:00
|
|
|
- x64
|
2015-01-15 07:07:18 +01:00
|
|
|
|
|
|
|
configuration:
|
|
|
|
- Release
|
2015-01-11 18:33:44 +01:00
|
|
|
|
|
|
|
install:
|
2015-07-07 21:22:26 +02:00
|
|
|
- git submodule update --init --recursive
|
2017-08-31 03:39:24 +02:00
|
|
|
- ps: |
|
|
|
|
if ($env:BUILD_TYPE -eq 'mingw') {
|
|
|
|
$dependencies = "mingw64/mingw-w64-x86_64-cmake",
|
|
|
|
"mingw64/mingw-w64-x86_64-qt5",
|
|
|
|
"mingw64/mingw-w64-x86_64-SDL2"
|
|
|
|
# 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
|
|
|
|
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S $dependencies" 2> $null
|
|
|
|
}
|
2015-01-11 18:33:44 +01:00
|
|
|
|
|
|
|
before_build:
|
2017-08-31 03:39:24 +02:00
|
|
|
- mkdir %BUILD_TYPE%_build
|
|
|
|
- cd %BUILD_TYPE%_build
|
|
|
|
- ps: |
|
|
|
|
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-01-16 04:53:53 +01:00
|
|
|
cmd /C 'cmake -G "Visual Studio 15 2017 Win64" -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_BUNDLED_UNICORN=1 .. 2>&1 && exit 0'
|
2017-08-31 03:39:24 +02:00
|
|
|
} else {
|
2018-01-16 04:53:53 +01:00
|
|
|
C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DYUZU_BUILD_UNICORN=1 -DCMAKE_BUILD_TYPE=Release .. 2>&1"
|
2017-08-31 03:39:24 +02:00
|
|
|
}
|
2015-01-11 18:33:44 +01:00
|
|
|
- cd ..
|
2015-01-24 16:45:06 +01:00
|
|
|
|
2017-08-31 03:39:24 +02:00
|
|
|
build_script:
|
|
|
|
- ps: |
|
|
|
|
if ($env:BUILD_TYPE -eq 'msvc') {
|
|
|
|
# https://www.appveyor.com/docs/build-phase
|
2018-01-13 22:37:06 +01:00
|
|
|
msbuild msvc_build/yuzu.sln /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
2017-08-31 03:39:24 +02:00
|
|
|
} else {
|
|
|
|
C:\msys64\usr\bin\bash.exe -lc 'mingw32-make -C mingw_build/ 2>&1'
|
|
|
|
}
|
2016-03-20 15:58:24 +01:00
|
|
|
|
2016-11-19 21:11:49 +01:00
|
|
|
after_build:
|
|
|
|
- ps: |
|
|
|
|
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-",""
|
|
|
|
$GITREV = $(git show -s --format='%h')
|
2017-07-27 06:29:33 +02:00
|
|
|
|
2017-08-10 06:17:27 +02:00
|
|
|
# Find out which kind of release we are producing by tag name
|
|
|
|
if ($env:APPVEYOR_REPO_TAG_NAME) {
|
2017-08-31 03:39:24 +02:00
|
|
|
$RELEASE_DIST, $RELEASE_VERSION = $env:APPVEYOR_REPO_TAG_NAME.split('-')
|
2017-08-10 06:17:27 +02:00
|
|
|
} else {
|
2017-08-31 03:39:24 +02:00
|
|
|
# There is no repo tag - make assumptions
|
|
|
|
$RELEASE_DIST = "head"
|
2017-08-10 06:17:27 +02:00
|
|
|
}
|
2017-07-27 06:29:33 +02:00
|
|
|
|
2017-08-31 03:39:24 +02:00
|
|
|
if ($env:BUILD_TYPE -eq 'msvc') {
|
|
|
|
# Where are these spaces coming from? Regardless, let's remove them
|
2018-01-13 22:37:06 +01:00
|
|
|
$MSVC_BUILD_ZIP = "yuzu-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
|
|
|
|
$MSVC_BUILD_PDB = "yuzu-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
|
|
|
|
$MSVC_SEVENZIP = "yuzu-windows-msvc-$GITDATE-$GITREV.7z" -replace " ", ""
|
2017-08-31 03:39:24 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2018-01-16 04:53:53 +01:00
|
|
|
mkdir pdb
|
|
|
|
Get-ChildItem ".\msvc_build\bin\" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb
|
|
|
|
7z a -tzip $MSVC_BUILD_PDB .\pdb\*.pdb
|
2017-08-31 03:39:24 +02:00
|
|
|
|
|
|
|
mkdir $RELEASE_DIST
|
2018-01-16 04:53:53 +01:00
|
|
|
Get-ChildItem ".\msvc_build\bin\" -Recurse -Filter "yuzu*.exe" | Copy-Item -destination $RELEASE_DIST
|
2017-08-31 03:39:24 +02:00
|
|
|
Copy-Item .\license.txt -Destination $RELEASE_DIST
|
|
|
|
Copy-Item .\README.md -Destination $RELEASE_DIST
|
|
|
|
7z a -tzip $MSVC_BUILD_ZIP $RELEASE_DIST\*
|
|
|
|
7z a $MSVC_SEVENZIP $RELEASE_DIST
|
|
|
|
} else {
|
2018-01-13 22:37:06 +01:00
|
|
|
$MINGW_BUILD_ZIP = "yuzu-windows-mingw-$GITDATE-$GITREV.zip" -replace " ", ""
|
|
|
|
$MINGW_SEVENZIP = "yuzu-windows-mingw-$GITDATE-$GITREV.7z" -replace " ", ""
|
2017-08-31 03:39:24 +02:00
|
|
|
# not going to bother adding separate debug symbols for mingw, so just upload a README for it
|
|
|
|
# if someone wants to add them, change mingw to compile with -g and use objdump and strip to separate the symbols from the binary
|
|
|
|
$MINGW_NO_DEBUG_SYMBOLS = "README_No_Debug_Symbols.txt"
|
|
|
|
Set-Content -Path $MINGW_NO_DEBUG_SYMBOLS -Value "This is a workaround for Appveyor since msvc has debug symbols but mingw doesnt" -Force
|
|
|
|
|
|
|
|
# store the build information in env vars so we can use them as artifacts
|
|
|
|
$env:BUILD_ZIP = $MINGW_BUILD_ZIP
|
|
|
|
$env:BUILD_SYMBOLS = $MINGW_NO_DEBUG_SYMBOLS
|
|
|
|
$env:BUILD_UPDATE = $MINGW_SEVENZIP
|
|
|
|
|
|
|
|
$CMAKE_SOURCE_DIR = "$env:APPVEYOR_BUILD_FOLDER"
|
2018-01-16 04:53:53 +01:00
|
|
|
$CMAKE_BINARY_DIR = "$CMAKE_SOURCE_DIR/mingw_build/bin"
|
2017-08-31 03:39:24 +02:00
|
|
|
$RELEASE_DIST = $RELEASE_DIST + "-mingw"
|
|
|
|
|
|
|
|
mkdir $RELEASE_DIST
|
|
|
|
mkdir $RELEASE_DIST/platforms
|
|
|
|
|
|
|
|
# copy the compiled binaries and other release files to the release folder
|
2018-01-16 04:53:53 +01:00
|
|
|
Get-ChildItem "$CMAKE_BINARY_DIR" -Filter "yuzu*.exe" | Copy-Item -destination $RELEASE_DIST
|
2017-08-31 03:39:24 +02:00
|
|
|
Copy-Item -path "$CMAKE_SOURCE_DIR/license.txt" -destination $RELEASE_DIST
|
|
|
|
Copy-Item -path "$CMAKE_SOURCE_DIR/README.md" -destination $RELEASE_DIST
|
|
|
|
# copy all the dll dependencies to the release folder
|
|
|
|
# hardcoded list because we don't build static and determining the list of dlls from the binary is a pain.
|
|
|
|
$MingwDLLs = "Qt5Core.dll","Qt5Widgets.dll","Qt5Gui.dll","Qt5OpenGL.dll",
|
|
|
|
# QT dll dependencies
|
|
|
|
"libbz2-*.dll","libicudt*.dll","libicuin*.dll","libicuuc*.dll","libffi-*.dll",
|
|
|
|
"libfreetype-*.dll","libglib-*.dll","libgobject-*.dll","libgraphite2.dll","libiconv-*.dll",
|
2018-01-16 04:53:53 +01:00
|
|
|
"libharfbuzz-*.dll","libintl-*.dll","libpcre-*.dll","libpcre2-16-*.dll","libpcre16-*.dll","libpng16-*.dll",
|
2017-08-31 03:39:24 +02:00
|
|
|
# Runtime/Other dependencies
|
2017-09-09 19:24:13 +02:00
|
|
|
"libgcc_s_seh-*.dll","libstdc++-*.dll","libwinpthread-*.dll","SDL2.dll","zlib1.dll"
|
2017-08-31 03:39:24 +02:00
|
|
|
foreach ($file in $MingwDLLs) {
|
|
|
|
Copy-Item -path "C:/msys64/mingw64/bin/$file" -force -destination "$RELEASE_DIST"
|
|
|
|
}
|
2017-09-06 02:57:47 +02:00
|
|
|
# the above list copies a few extra debug dlls that aren't needed (thanks globbing patterns!)
|
|
|
|
# so we can remove them by hardcoding another list of extra dlls to remove
|
|
|
|
$DebugDLLs = "libicudtd*.dll","libicuind*.dll","libicuucd*.dll"
|
|
|
|
foreach ($file in $DebugDLLs) {
|
|
|
|
Remove-Item -path "$RELEASE_DIST/$file"
|
|
|
|
}
|
2017-08-31 03:39:24 +02:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
|
|
|
7z a -tzip $MINGW_BUILD_ZIP $RELEASE_DIST\*
|
|
|
|
7z a $MINGW_SEVENZIP $RELEASE_DIST
|
|
|
|
}
|
2016-09-01 18:47:31 +02:00
|
|
|
|
2016-11-19 21:11:49 +01:00
|
|
|
test_script:
|
2017-08-31 03:39:24 +02:00
|
|
|
- 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-25 20:34:09 +02:00
|
|
|
|
2016-11-19 21:11:49 +01:00
|
|
|
artifacts:
|
2017-08-31 03:39:24 +02:00
|
|
|
- path: $(BUILD_ZIP)
|
|
|
|
name: build
|
2016-11-19 21:11:49 +01:00
|
|
|
type: zip
|
2017-08-31 03:39:24 +02:00
|
|
|
- path: $(BUILD_SYMBOLS)
|
|
|
|
name: debugsymbols
|
|
|
|
- path: $(BUILD_UPDATE)
|
|
|
|
name: update
|
2015-05-25 20:34:09 +02:00
|
|
|
|
2016-11-19 21:11:49 +01:00
|
|
|
deploy:
|
2017-01-05 04:39:59 +01:00
|
|
|
provider: GitHub
|
2017-08-03 07:51:48 +02:00
|
|
|
release: $(appveyor_repo_tag_name)
|
2017-01-05 04:39:59 +01:00
|
|
|
auth_token:
|
2018-01-18 04:38:52 +01:00
|
|
|
secure: QqePPnXbkzmXct5c8hZ2X5AbsthbI6cS1Sr+VBzcD8oUOIjfWJJKXVAQGUbQAbb0
|
2017-08-31 03:39:24 +02:00
|
|
|
artifact: update,build
|
2017-01-05 04:39:59 +01:00
|
|
|
draft: false
|
|
|
|
prerelease: false
|
2016-11-19 21:11:49 +01:00
|
|
|
on:
|
2017-08-03 07:51:48 +02:00
|
|
|
appveyor_repo_tag: true
|