summaryrefslogtreecommitdiff
path: root/appveyor.yml
diff options
context:
space:
mode:
Diffstat (limited to 'appveyor.yml')
-rw-r--r--appveyor.yml166
1 files changed, 126 insertions, 40 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 94e9969f5..5524eb576 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -7,6 +7,15 @@ cache:
7 7
8os: Visual Studio 2017 8os: Visual Studio 2017
9 9
10environment:
11 # Tell msys2 to add mingw64 to the path
12 MSYSTEM: MINGW64
13 # Tell msys2 to inherit the current directory when starting the shell
14 CHERE_INVOKING: 1
15 matrix:
16 - BUILD_TYPE: mingw
17 - BUILD_TYPE: msvc
18
10platform: 19platform:
11 - x64 20 - x64
12 21
@@ -15,72 +24,149 @@ configuration:
15 24
16install: 25install:
17 - git submodule update --init --recursive 26 - git submodule update --init --recursive
27 - ps: |
28 if ($env:BUILD_TYPE -eq 'mingw') {
29 $dependencies = "mingw64/mingw-w64-x86_64-cmake",
30 "mingw64/mingw-w64-x86_64-qt5",
31 "mingw64/mingw-w64-x86_64-curl",
32 "mingw64/mingw-w64-x86_64-SDL2"
33 # redirect err to null to prevent warnings from becoming errors
34 # workaround to prevent pacman from failing due to cyclical dependencies
35 C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw64/mingw-w64-x86_64-freetype mingw64/mingw-w64-x86_64-fontconfig" 2> $null
36 C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S $dependencies" 2> $null
37 }
18 38
19before_build: 39before_build:
20 - mkdir build 40 - mkdir %BUILD_TYPE%_build
21 - cd build 41 - cd %BUILD_TYPE%_build
22 - cmake -G "Visual Studio 15 2017 Win64" -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCMAKE_USE_OPENSSL=0 .. 42 - ps: |
43 if ($env:BUILD_TYPE -eq 'msvc') {
44 # redirect stderr and change the exit code to prevent powershell from cancelling the build if cmake prints a warning
45 cmd /C 'cmake -G "Visual Studio 15 2017 Win64" -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCMAKE_USE_OPENSSL=0 .. 2>&1 && exit 0'
46 } else {
47 C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DUSE_SYSTEM_CURL=1 -DCITRA_USE_BUNDLED_CURL=1 -DCMAKE_BUILD_TYPE=Release .. 2>&1"
48 }
23 - cd .. 49 - cd ..
24 50
25build: 51build_script:
26 project: build/citra.sln 52 - ps: |
27 parallel: true 53 if ($env:BUILD_TYPE -eq 'msvc') {
54 # https://www.appveyor.com/docs/build-phase
55 msbuild msvc_build/citra.sln /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
56 } else {
57 C:\msys64\usr\bin\bash.exe -lc 'mingw32-make -C mingw_build/ 2>&1'
58 }
28 59
29after_build: 60after_build:
30 - ps: | 61 - ps: |
31 $GITDATE = $(git show -s --date=short --format='%ad') -replace "-","" 62 $GITDATE = $(git show -s --date=short --format='%ad') -replace "-",""
32 $GITREV = $(git show -s --format='%h') 63 $GITREV = $(git show -s --format='%h')
33 $GIT_LONG_HASH = $(git rev-parse HEAD)
34 # Where are these spaces coming from? Regardless, let's remove them
35 $MSVC_BUILD_NAME = "citra-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
36 $MSVC_BUILD_PDB = "citra-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
37 $MSVC_SEVENZIP = "citra-windows-msvc-$GITDATE-$GITREV.7z" -replace " ", ""
38 $BINTRAY_VERSION = "nightly-$GIT_LONG_HASH" -replace " ", ""
39
40 # set the build names as env vars so the artifacts can upload them
41 $env:MSVC_BUILD_NAME = $MSVC_BUILD_NAME
42 $env:MSVC_BUILD_PDB = $MSVC_BUILD_PDB
43 $env:MSVC_SEVENZIP = $MSVC_SEVENZIP
44 $env:GITREV = $GITREV
45
46 7z a -tzip $MSVC_BUILD_PDB .\build\bin\release\*.pdb
47 rm .\build\bin\release\*.pdb
48 64
49 # Find out which kind of release we are producing by tag name 65 # Find out which kind of release we are producing by tag name
50 if ($env:APPVEYOR_REPO_TAG_NAME) { 66 if ($env:APPVEYOR_REPO_TAG_NAME) {
51 $RELEASE_DIST, $RELEASE_VERSION = $env:APPVEYOR_REPO_TAG_NAME.split('-') 67 $RELEASE_DIST, $RELEASE_VERSION = $env:APPVEYOR_REPO_TAG_NAME.split('-')
52 } else { 68 } else {
53 # There is no repo tag - make assumptions 69 # There is no repo tag - make assumptions
54 $RELEASE_DIST = "head" 70 $RELEASE_DIST = "head"
55 } 71 }
56 72
57 mkdir $RELEASE_DIST 73 if ($env:BUILD_TYPE -eq 'msvc') {
58 Copy-Item .\build\bin\release\* -Destination $RELEASE_DIST -Recurse 74 # Where are these spaces coming from? Regardless, let's remove them
59 Copy-Item .\license.txt -Destination $RELEASE_DIST 75 $MSVC_BUILD_ZIP = "citra-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
60 Copy-Item .\README.md -Destination $RELEASE_DIST 76 $MSVC_BUILD_PDB = "citra-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
61 77 $MSVC_SEVENZIP = "citra-windows-msvc-$GITDATE-$GITREV.7z" -replace " ", ""
62 7z a -tzip $MSVC_BUILD_NAME $RELEASE_DIST\* 78
63 7z a $MSVC_SEVENZIP $RELEASE_DIST 79 # set the build names as env vars so the artifacts can upload them
80 $env:BUILD_ZIP = $MSVC_BUILD_ZIP
81 $env:BUILD_SYMBOLS = $MSVC_BUILD_PDB
82 $env:BUILD_UPDATE = $MSVC_SEVENZIP
83
84 7z a -tzip $MSVC_BUILD_PDB .\msvc_build\bin\release\*.pdb
85 rm .\msvc_build\bin\release\*.pdb
86
87 mkdir $RELEASE_DIST
88 Copy-Item .\msvc_build\bin\release\* -Destination $RELEASE_DIST -Recurse
89 Copy-Item .\license.txt -Destination $RELEASE_DIST
90 Copy-Item .\README.md -Destination $RELEASE_DIST
91 7z a -tzip $MSVC_BUILD_ZIP $RELEASE_DIST\*
92 7z a $MSVC_SEVENZIP $RELEASE_DIST
93 } else {
94 $MINGW_BUILD_ZIP = "citra-windows-mingw-$GITDATE-$GITREV.zip" -replace " ", ""
95 $MINGW_SEVENZIP = "citra-windows-mingw-$GITDATE-$GITREV.7z" -replace " ", ""
96 # not going to bother adding separate debug symbols for mingw, so just upload a README for it
97 # if someone wants to add them, change mingw to compile with -g and use objdump and strip to separate the symbols from the binary
98 $MINGW_NO_DEBUG_SYMBOLS = "README_No_Debug_Symbols.txt"
99 Set-Content -Path $MINGW_NO_DEBUG_SYMBOLS -Value "This is a workaround for Appveyor since msvc has debug symbols but mingw doesnt" -Force
100
101 # store the build information in env vars so we can use them as artifacts
102 $env:BUILD_ZIP = $MINGW_BUILD_ZIP
103 $env:BUILD_SYMBOLS = $MINGW_NO_DEBUG_SYMBOLS
104 $env:BUILD_UPDATE = $MINGW_SEVENZIP
105
106 $CMAKE_SOURCE_DIR = "$env:APPVEYOR_BUILD_FOLDER"
107 $CMAKE_BINARY_DIR = "$CMAKE_SOURCE_DIR/mingw_build"
108 $RELEASE_DIST = $RELEASE_DIST + "-mingw"
109
110 mkdir $RELEASE_DIST
111 mkdir $RELEASE_DIST/platforms
112
113 # copy the compiled binaries and other release files to the release folder
114 Get-ChildItem "$CMAKE_BINARY_DIR" -Recurse -Filter "citra*.exe" | Copy-Item -destination $RELEASE_DIST
115 # copy the libcurl dll
116 Get-ChildItem "$CMAKE_BINARY_DIR" -Recurse -Filter "libcurl.dll" | Copy-Item -destination $RELEASE_DIST
117 Copy-Item -path "$CMAKE_SOURCE_DIR/license.txt" -destination $RELEASE_DIST
118 Copy-Item -path "$CMAKE_SOURCE_DIR/README.md" -destination $RELEASE_DIST
119 # copy all the dll dependencies to the release folder
120 # hardcoded list because we don't build static and determining the list of dlls from the binary is a pain.
121 $MingwDLLs = "Qt5Core.dll","Qt5Widgets.dll","Qt5Gui.dll","Qt5OpenGL.dll",
122 # QT dll dependencies
123 "libbz2-*.dll","libicudt*.dll","libicuin*.dll","libicuuc*.dll","libffi-*.dll",
124 "libfreetype-*.dll","libglib-*.dll","libgobject-*.dll","libgraphite2.dll","libiconv-*.dll",
125 "libharfbuzz-*.dll","libintl-*.dll","libpcre-*.dll","libpcre16-*.dll","libpng16-*.dll",
126 # Runtime/Other dependencies
127 "libgcc_s_seh-*.dll","libstdc++-*.dll","libwinpthread-*.dll","SDL2.dll","zlib1.dll"
128 foreach ($file in $MingwDLLs) {
129 Copy-Item -path "C:/msys64/mingw64/bin/$file" -force -destination "$RELEASE_DIST"
130 }
131 # the above list copies a few extra debug dlls that aren't needed (thanks globbing patterns!)
132 # so we can remove them by hardcoding another list of extra dlls to remove
133 $DebugDLLs = "libicudtd*.dll","libicuind*.dll","libicuucd*.dll"
134 foreach ($file in $DebugDLLs) {
135 Remove-Item -path "$RELEASE_DIST/$file"
136 }
137
138 # copy the qt windows plugin dll to platforms
139 Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/platforms/qwindows.dll" -force -destination "$RELEASE_DIST/platforms"
140
141 7z a -tzip $MINGW_BUILD_ZIP $RELEASE_DIST\*
142 7z a $MINGW_SEVENZIP $RELEASE_DIST
143 }
64 144
65test_script: 145test_script:
66 - cd build && ctest -VV -C Release && cd .. 146 - cd %BUILD_TYPE%_build
147 - ps: |
148 if ($env:BUILD_TYPE -eq 'msvc') {
149 ctest -VV -C Release
150 } else {
151 C:\msys64\usr\bin\bash.exe -lc "ctest -VV -C Release"
152 }
153 - cd ..
67 154
68artifacts: 155artifacts:
69 - path: $(MSVC_BUILD_NAME) 156 - path: $(BUILD_ZIP)
70 name: msvcbuild 157 name: build
71 type: zip
72 - path: $(MSVC_BUILD_PDB)
73 name: msvcdebug
74 type: zip 158 type: zip
75 - path: $(MSVC_SEVENZIP) 159 - path: $(BUILD_SYMBOLS)
76 name: msvcupdate 160 name: debugsymbols
161 - path: $(BUILD_UPDATE)
162 name: update
77 163
78deploy: 164deploy:
79 provider: GitHub 165 provider: GitHub
80 release: $(appveyor_repo_tag_name) 166 release: $(appveyor_repo_tag_name)
81 auth_token: 167 auth_token:
82 secure: "dbpsMC/MgPKWFNJCXpQl4cR8FYhepkPLjgNp/pRMktZ8oLKTqPYErfreaIxb/4P1" 168 secure: "dbpsMC/MgPKWFNJCXpQl4cR8FYhepkPLjgNp/pRMktZ8oLKTqPYErfreaIxb/4P1"
83 artifact: msvcupdate,msvcbuild 169 artifact: update,build
84 draft: false 170 draft: false
85 prerelease: false 171 prerelease: false
86 on: 172 on: