forked from Yabause/yabause
-
Notifications
You must be signed in to change notification settings - Fork 56
/
appveyor.yml
92 lines (74 loc) · 4.84 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
environment:
MINGW: C:\Qt\Tools\mingw492_32
CMAKE_BUILD_TYPE: Release
# set to d if debug build
qt_dll_suffix: ""
matrix:
# Visual Studio build
- generator: "Visual Studio 12 Win64"
CMAKE_PREFIX_PATH: C:\Qt\5.4\msvc2013_64_opengl
compiler_type: "vs12-x64"
sdl_filename: SDL2-devel-2.0.3-VC.zip
sdl_arch: x64
cmake_args: "-DYAB_WANT_DIRECTSOUND=ON -DYAB_WANT_DIRECTINPUT=ON -DYAB_NETWORK=ON -DYAB_WANT_GDBSTUB=ON"
# MingGW x86 build
- generator: "MinGW Makefiles"
CMAKE_PREFIX_PATH: C:\Qt\5.5\mingw492_32
CMAKE_C_COMPILER: gcc
CMAKE_CXX_COMPILER: g++
CMAKE_MAKE_PROGRAM: mingw32-make.exe
compiler_type: "mingw32"
# filename on the sdl website
sdl_filename: SDL2-devel-2.0.3-mingw.tar.gz
sdl_arch: x86
# included directx headers incompatible with mingw
cmake_args: "-DYAB_NETWORK=ON -DYAB_WANT_GDBSTUB=ON"
# MSYS2 x86_64 build
- compiler_type: "msys2-mingw-w64-x86_64"
shallow_clone: true
init:
# cmake errors if sh on the path
# - rm "C:\Program Files (x86)\Git\bin\sh.exe"
- rm "C:\Program Files\Git\usr\bin\sh.exe"
# cpack won't work because of chocolatey sharing the same name
- rm "C:\ProgramData\chocolatey\bin\cpack.exe"
- set Path=%MINGW%\bin;%Path%
before_build:
# fetch appropriate sdl lib for visual studio or mingw
- cd c:\
- if NOT ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] appveyor DownloadFile https://www.libsdl.org/release/%sdl_filename%
# decompress it, shorten 7z output with FIND
- if NOT ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] 7z x %sdl_filename% | FIND /V "ing "
# mingw version is a tar.gz, decompress again
- if [%sdl_filename%]==[SDL2-devel-2.0.3-mingw.tar.gz] 7z x SDL2-devel-2.0.3-mingw.tar | FIND /V "ing "
# generate project files or makefiles
- cd C:\projects\yabause\yabause
- mkdir build
- cd build
- if NOT ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] cmake -G "%generator%" %cmake_args% -DSDL2MAIN_LIBRARY=C:/SDL2-2.0.3/lib/%sdl_arch%/SDL2main.lib -DSDL2_INCLUDE_DIR=C:/SDL2-2.0.3/include/ -DSDL2_LIBRARY=C:/SDL2-2.0.3/lib/%sdl_arch%/SDL2.lib ..
#MSYS2
- if ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] set MSYSTEM=MINGW64
- if ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;C:\msys64;%PATH%
- if ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy"
- if ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw64/mingw-w64-x86_64-SDL2 mingw-w64-x86_64-binutils mingw64/mingw-w64-x86_64-qt5 mingw-w64-x86_64-crt-git mingw-w64-x86_64-headers-git mingw64/mingw-w64-x86_64-libwebp"
- if ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] C:\msys64\usr\bin\bash -lc "cd C:/projects/yabause/yabause/build ; cmake -G\"MSYS Makefiles\" -DCMAKE_BUILD_TYPE=Release -DDirectX_INCLUDE_DIR=C:/msys64/mingw64/x86_64-w64-mingw32/include -DYAB_WANT_DIRECTSOUND=ON -DYAB_WANT_DIRECTINPUT=ON -DYAB_NETWORK=ON -DYAB_WANT_GDBSTUB=ON -DYAB_WANT_GLUT=OFF -DMSYS2_BUILD=ON -DCMAKE_PREFIX_PATH=\"C:/msys64/mingw64/bin;C:/msys64/mingw64/include;C:/msys64/mingw64/lib;C:/msys64/mingw64/x86_64-w64-mingw32/include;C:/msys64/mingw64/x86_64-w64-mingw32/lib\" -DSDL2_LIBRARY=C:/msys64/mingw64/lib/libSDL2.dll.a .."
build_script:
- if ["%compiler_type%"]==["mingw32"] cmake --build .
- if ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] C:\msys64\usr\bin\bash -lc "cd C:/projects/yabause/yabause/build ; make "
# force a release build and only show errors to shorten output
- if ["%compiler_type%"]==["vs12-x64"] msbuild yabause.sln /p:configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# make a distributable package of the build output
after_build:
- cd C:\projects\yabause\yabause\build
# zip all output files and push the artifact, name it with the commit, date and compiler type
- ps: $git_hash_date = ${env:APPVEYOR_REPO_COMMIT}.substring(0, 7)
- ps: $git_hash_date += "-"
- ps: $git_hash_date += ${env:APPVEYOR_REPO_COMMIT_TIMESTAMP}.substring(0,10)
- ps: ${env:yab_name} = "yabause-${git_hash_date}-${env:compiler_type}"
- cmd: cpack -G ZIP -D CPACK_PACKAGE_FILE_NAME=%yab_name%
- appveyor PushArtifact %yab_name%.zip
# Upload build to yabause.org
- ps: ${env:yab_name_alt} = "yabause-latest-win64"
#- ps: ${env:yab_name_alt2} = "yabause-${git_hash_date}-win64"
- if ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] if not defined APPVEYOR_PULL_REQUEST_NUMBER curl --ftp-create-dirs -T %yab_name%.zip -u %YABUSR%:%YABPAS% ftp://ftp.tuxfamily.org/yabause/yabause-repository/releases/travis-ci/%yab_name_alt%.zip
#- if ["%compiler_type%"]==["msys2-mingw-w64-x86_64"] curl --ftp-create-dirs -T %yab_name%.zip -u %YABUSR%:%YABPAS% ftp://ftp.tuxfamily.org/yabause/yabause-repository/releases/travis-ci/%yab_name_alt2%.zip