forked from widelands/widelands
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
62 lines (52 loc) · 2.65 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
###################################
# Widelands.org #
# #
# Appveyor build configuration #
###################################
image: Visual Studio 2022
init:
- cmd: "IF \"%PLATFORM%\" == \"x86\" (set MINGWPATH=C:\\msys64\\mingw32\\bin& set MINGWSUFFIX=i686& set MINGWINCLUDE=C:\\msys64\\mingw32\\include& set BITS=32) ELSE (set MINGWPATH=C:\\msys64\\mingw64\\bin& set MINGWSUFFIX=x86_64& set MINGWINCLUDE=C:\\msys64\\mingw64\\include& set BITS=64)"
install:
# Installing various utilities
# As of 2019-12-06 we have to install 'chocolatey-core.extension' beforehand.
# Otherwise installing 'InnoSetup' will fail.
- choco install -y chocolatey-core.extension
- choco install -y InnoSetup
- cmd: "set PATH=%MINGWPATH%;C:\\msys64\\usr\\bin;C:\\Program Files (x86)\\Inno Setup 5;%PATH%"
- cmd: "set CC=%MINGWPATH%\\gcc.exe"
- cmd: "set CXX=%MINGWPATH%\\g++.exe"
# deleting broken repo from mirrorlist (needs to be repeated after first update if needed)
# - cmd: "bash --login -c \"sed -i 7,8d C:/msys64/etc/pacman.d/mirrorlist.msys\""
# - cmd: "bash --login -c \"sed -i 7,8d C:/msys64/etc/pacman.d/mirrorlist.mingw32\""
# - cmd: "bash --login -c \"sed -i 7,8d C:/msys64/etc/pacman.d/mirrorlist.mingw64\""
# Update msys2 system (twice, first run does system packages)
- cmd: "bash --login -c \"pacman -Suuyy --noconfirm\""
- cmd: "bash --login -c \"pacman -Suuyy --noconfirm\""
# Installed required libs
- cmd: "bash --login -c \"%APPVEYOR_BUILD_FOLDER:\\=/%/install-dependencies.sh msys%BITS% --noconfirm\""
# Downgrade incompatible packages to working version
# - cmd: "bash --login -c \"pacman --noconfirm -U https://repo.msys2.org/mingw/%MINGWSUFFIX%/mingw-w64-%MINGWSUFFIX%-libtiff-4.3.0-3-any.pkg.tar.zst\""
shallow_clone: false
branches:
only:
- master
- release-1.1
skip_tags: true
build_script:
- cmd: cd %APPVEYOR_BUILD_FOLDER%
- cmd: md build
- cmd: cd build
# detect version
- cmd: set WIDELANDS_SETUP_NAME=Widelands-%PLATFORM%-1.1
# finally start the build
- cmd: "cmake -G \"Ninja\" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DOPTION_BUILD_WINSTATIC=ON -DOPTION_BUILD_WEBSITE_TOOLS=OFF -DOPTION_ASAN=OFF -DOPTION_BUILD_CODECHECK=OFF -DCMAKE_JOB_POOLS=\"linking=1\" -DCMAKE_JOB_POOL_LINK=linking %APPVEYOR_BUILD_FOLDER%"
- cmd: "cmake --build ."
on_success:
- cmd: strip -sv %APPVEYOR_BUILD_FOLDER%\build\src\widelands.exe
- cmd: ISCC /q /o%APPVEYOR_BUILD_FOLDER% /f%WIDELANDS_SETUP_NAME% c:\projects\widelands\utils\win32\innosetup\Widelands.iss
- appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\%WIDELANDS_SETUP_NAME%.exe
platform:
- x64
- x86
configuration:
- Release