-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathappveyor.yml
88 lines (76 loc) · 2.68 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
# shallow clone
clone_depth: 10
version: '{build}'
cache:
- C:\tools\vcpkg\installed\
os: Visual Studio 2019
environment:
# Tell MSYS2 to inherit the current directory when starting the shell
CHERE_INVOKING: 1
matrix:
- platform: x64
BUILD_TYPE: mingw
MSYSTEM: MINGW64
- platform: x64
BUILD_TYPE: msvc
VCPKG_DEFAULT_TRIPLET: x64-windows
configuration:
- Release
install:
- git submodule update --init --recursive
- ps: |
if ($env:BUILD_TYPE -eq 'mingw') {
# redirect err to null to prevent warnings from becoming errors
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-unicorn mingw-w64-x86_64-glew mingw-w64-x86_64-openal mingw-w64-x86_64-enet 2>&1"
} else {
vcpkg install unicorn sdl2 glew openal-soft enet
}
before_build:
- mkdir build
- cd build
- ps: |
if ($env:BUILD_TYPE -eq 'mingw') {
C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=Release .. 2>&1"
} else {
# redirect stderr and change the exit code to prevent powershell from cancelling the build if cmake prints a warning
cmd /C 'cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake .. 2>&1 && exit 0'
}
- cd ..
build_script:
- ps: |
if ($env:BUILD_TYPE -eq 'mingw') {
C:\msys64\usr\bin\bash.exe -lc 'mingw32-make -j4 -C build/ 2>&1'
} else {
msbuild build/openswe1r.sln /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
}
- cmake --build build --config Release --target package
artifacts:
- path: build/*.zip
name: executable
deploy:
- provider: GitHub
tag: dev-$(appveyor_build_version)
release: Development Release $(appveyor_build_version)
description: >
Automatically created development release $(appveyor_build_version)
Use this release to test cutting edge features and changes not
included in the latest offical release build.
prerelease: true
repository: OpenSWE1R/openswe1r-unstable
auth_token:
secure: dt7LXTsIxqTkmXC0FdK7k7K23ifilaIvb0wFXCVDhrNk6u6myk6I0Zgz/FwQ1nFf
on:
appveyor_repo_tag: false
branch: master
BUILD_TYPE: msvc
- provider: GitHub
tag: $(appveyor_repo_tag_name)
release: Version $(appveyor_repo_tag_name)
description: >
Stable release version $(appveyor_build_version)
auth_token:
secure: dt7LXTsIxqTkmXC0FdK7k7K23ifilaIvb0wFXCVDhrNk6u6myk6I0Zgz/FwQ1nFf
on:
appveyor_repo_tag: true
branch: master
BUILD_TYPE: msvc