-
Notifications
You must be signed in to change notification settings - Fork 8
/
appveyor.yml
80 lines (68 loc) · 2.26 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
version: 0.{build}
clone_folder: c:\gopath\src\ndsemu
platform:
- x64
- x86
environment:
GOPATH: c:\gopath
OUT: c:\ndsemu
install:
- |-
set PREFIX64=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64
set PREFIX32=C:\MinGW
set ARCH64=x86_64-w64-mingw32
set ARCH32=i686-w64-mingw32
set INCLUDE64=%PREFIX64%\lib\gcc\x86_64-w64-mingw32\6.3.0\include
set INCLUDE32=%PREFIX32%\include
mkdir %INCLUDE64%\SDL2
mkdir %INCLUDE32%\SDL2
mkdir %OUT%
# SDL2
- |-
cd %TEMP%
appveyor DownloadFile http:https://www.libsdl.org/release/SDL2-devel-2.0.5-mingw.tar.gz
7z x SDL2-devel-2.0.5-mingw.tar.gz > nul
7z x SDL2-devel-2.0.5-mingw.tar > nul
copy SDL2-2.0.5\%ARCH64%\include\SDL2\* %INCLUDE64%\SDL2 > nul
copy SDL2-2.0.5\%ARCH64%\lib\*.a %PREFIX64%\lib > nul
copy SDL2-2.0.5\%ARCH32%\include\SDL2\* %INCLUDE32%\SDL2 > nul
copy SDL2-2.0.5\%ARCH32%\lib\*.a %PREFIX32%\lib > nul
if "%platform%"=="x64" (copy SDL2-2.0.5\%ARCH64%\bin\SDL2.dll %OUT% > nul)
if "%platform%"=="x86" (copy SDL2-2.0.5\%ARCH32%\bin\SDL2.dll %OUT% > nul)
cd %APPVEYOR_BUILD_FOLDER%
- if "%platform%"=="x64" (set "PATH=%PREFIX64%\bin;%PATH%")
- if "%platform%"=="x86" (set "PATH=%PREFIX32%\bin;%PATH%")
- if "%platform%"=="x86" (set "GOARCH=386")
- echo %PATH%
- echo | gcc -E -Wp,-v -
build_script:
- go build -i -v
- copy ndsemu.exe %OUT%\
# Create package
- if "%APPVEYOR_REPO_TAG%"=="true" set PACKAGE=ndsemu-%APPVEYOR_REPO_TAG_NAME%-win32-%PLATFORM%.zip
- if "%APPVEYOR_REPO_TAG%"=="false" set PACKAGE=ndsemu-%APPVEYOR_BUILD_VERSION%-win32-%PLATFORM%.zip
- |-
cd C:\
7z a %PACKAGE% ndsemu >nul
appveyor PushArtifact %PACKAGE%
deploy:
- provider: GitHub
artifact: /.*\.zip/
auth_token:
secure: ML+rP8ewYOJ8llZM+NV3qdR+/+VcZ9JdBXFXDnx1lUPNYJ38UQLGDmRaPK7onNbt
prerelease: true
draft: true
release: master-last-build
description: "Automatic build of latest master branch."
on:
branch: master
- provider: GitHub
artifact: /.*\.zip/
tag: $(APPVEYOR_REPO_TAG_NAME)
release: $(APPVEYOR_REPO_TAG_NAME)
auth_token:
secure: ML+rP8ewYOJ8llZM+NV3qdR+/+VcZ9JdBXFXDnx1lUPNYJ38UQLGDmRaPK7onNbt
prerelease: false
draft: true
on:
appveyor_repo_tag: true