-
Notifications
You must be signed in to change notification settings - Fork 6
/
.appveyor.yml
75 lines (65 loc) · 2.98 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
version: '{branch}.{build}'
os: Visual Studio 2015
clone_depth: 1
cache:
- c:\usr -> .appveyor.yml
- c:\freshmingw -> .appveyor.yml
before_build:
- |-
set PREFIX=C:\usr
set ARCH=i686-w64-mingw32
set MINGW32=C:\freshmingw
# depends are only fetched where there's no cache
- if exist %PREFIX% set DEPENDS=rem
- |-
%DEPENDS% mkdir %PREFIX%\include\SDL2
%DEPENDS% mkdir %PREFIX%\lib
%DEPENDS% cd %TEMP%
# SDL2
- |-
%DEPENDS% appveyor DownloadFile http://www.libsdl.org/release/SDL2-devel-2.0.7-mingw.tar.gz
%DEPENDS% 7z x SDL2-devel-2.0.7-mingw.tar.gz > nul
%DEPENDS% 7z x SDL2-devel-2.0.7-mingw.tar > nul
%DEPENDS% copy SDL2-2.0.7\%ARCH%\include\SDL2\* %PREFIX%\include\SDL2 > nul
%DEPENDS% copy SDL2-2.0.7\%ARCH%\lib\*.a %PREFIX%\lib > nul
%DEPENDS% copy SDL2-2.0.7\%ARCH%\bin\*.dll %PREFIX%\lib > nul
# SDL2_image
- |-
%DEPENDS% appveyor DownloadFile http://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.2-mingw.tar.gz
%DEPENDS% 7z x SDL2_image-devel-2.0.2-mingw.tar.gz > nul
%DEPENDS% 7z x SDL2_image-devel-2.0.2-mingw.tar > nul
%DEPENDS% copy SDL2_image-2.0.2\%ARCH%\include\SDL2\* %PREFIX%\include\SDL2 > nul
%DEPENDS% copy SDL2_image-2.0.2\%ARCH%\lib\*.a %PREFIX%\lib > nul
%DEPENDS% copy SDL2_image-2.0.2\%ARCH%\bin\*.dll %PREFIX%\lib > nul
# SDL2_ttf
- |-
%DEPENDS% appveyor DownloadFile https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.14-mingw.tar.gz
%DEPENDS% 7z x SDL2_ttf-devel-2.0.14-mingw.tar.gz > nul
%DEPENDS% 7z x SDL2_ttf-devel-2.0.14-mingw.tar > nul
%DEPENDS% copy SDL2_ttf-2.0.14\%ARCH%\include\SDL2\* %PREFIX%\include\SDL2 > nul
%DEPENDS% copy SDL2_ttf-2.0.14\%ARCH%\lib\*.a %PREFIX%\lib > nul
%DEPENDS% copy SDL2_ttf-2.0.14\%ARCH%\bin\*.dll %PREFIX%\lib > nul
# SDL2_mixer
- |-
%DEPENDS% appveyor DownloadFile https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.2-mingw.tar.gz
%DEPENDS% 7z x SDL2_mixer-devel-2.0.2-mingw.tar.gz > nul
%DEPENDS% 7z x SDL2_mixer-devel-2.0.2-mingw.tar > nul
%DEPENDS% copy SDL2_mixer-2.0.2\%ARCH%\include\SDL2\* %PREFIX%\include\SDL2 > nul
%DEPENDS% copy SDL2_mixer-2.0.2\%ARCH%\lib\*.a %PREFIX%\lib > nul
%DEPENDS% copy SDL2_mixer-2.0.2\%ARCH%\bin\*.dll %PREFIX%\lib > nul
# Newer mingw is required, as older mingw32 does not support std::thread
- |-
%DEPENDS% appveyor DownloadFile "http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/Personal Builds/mingw-builds/4.9.3/threads-posix/dwarf/i686-4.9.3-release-posix-dwarf-rt_v4-rev1.7z/download"
%DEPENDS% 7z x download -o%MINGW32% > nul
build_script:
- |-
set Path=%MINGW32%\mingw32\bin;%Path%
cd %APPVEYOR_BUILD_FOLDER%
del "C:\Program Files\Git\usr\bin\sh.exe"
# Build
- |-
cmake --version
cmake -DCMAKE_PREFIX_PATH="%PREFIX%" -DCMAKE_CXX_COMPILER=%ARCH%-c++.exe -DCMAKE_MAKE_PROGRAM=mingw32-make.exe -G "MinGW Makefiles"
- |-
mingw32-make
mingw32-make test_flat