File: appveyor.yml

package info (click to toggle)
fife 0.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 24,708 kB
  • sloc: cpp: 42,641; xml: 18,881; python: 13,555; makefile: 22
file content (178 lines) | stat: -rw-r--r-- 7,097 bytes parent folder | download
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# Build worker image (VM template)
image: Visual Studio 2017

clone_depth: 5

version: '{build}'

platform:
  - x86

configuration:
  - Release
  #- Debug

environment:
  MSBUILD_FLAGS: /verbosity:minimal /maxcpucount
  matrix:
    # VS 15 + Py2.7
    - generator: "Visual Studio 15"
      PYTHON: "C:\\Python27"
      PYTHON_VERSION: "2.7"
    # VS 15 + Py3.5
    #- generator: "Visual Studio 15"
    #  PYTHON: "C:\\Python35"
    #  PYTHON_VERSION: "3.5"
    # VS 15 + Py3.6
    - generator: "Visual Studio 15"
      PYTHON: "C:\\Python36"
      PYTHON_VERSION: "3.6"
    # MinGW
    #- generator: "MinGW Makefiles"

matrix:
  fast_finish: true

cache:
#  - C:\projects\fifengine-dependencies
#  - C:\projects\fifengine-dependencies\downloads
#  - C:\projects\fifengine-dependencies\includes

# scripts that are called at very beginning, before repo cloning
init:
  #- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
  - date /T & time /T
  - git config --global core.autocrlf input
  - cmake --version
  # Set "build version number" to "short-commit-hash" or when tagged to "tag name" (Travis style)
  - ps: >-
      if ($env:APPVEYOR_REPO_TAG -eq "true")
      {
        Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME"
      }
      else
      {
        Update-AppveyorBuild -Version "dev-$($env:APPVEYOR_REPO_COMMIT.substring(0,7))"
      }
  # There are multiple pre-installed versions of Python on Appveyor
  # see https://www.appveyor.com/docs/installed-software/#python
  - echo %PYTHON% %PYTHON_VERSION%
  - "SET PATH=%PYTHON%;%PYTHON%\\bin;%PYTHON%\\Scripts;%PATH%"
  # Show version and architecture for Python
  - "%PYTHON%\\python.exe --version"
  - "%PYTHON%\\python.exe -c \"import struct; print(struct.calcsize('P') * 8)\""

install:
  # set path to boost according to compiler toolchain
  - if "%generator%" == "Visual Studio 15" (SET boost_root=C:\Libraries\boost_1_67_0)
  - if "%generator%" == "Visual Studio 15" (SET boost_librarydir=C:\Libraries\boost_1_67_0\lib32-msvc-14.1)
  # get dependencies
  - cmake dependencies -G "%generator%" -B../fifengine-dependencies/build
  - cmake --build ../fifengine-dependencies/build --target ALL_BUILD --config %configuration%
  - ps: .$env:APPVEYOR_BUILD_FOLDER\build\appveyor\dl_extract_cegui-sdk.ps1
  # show dependency folders
  - dir ..\fifengine-dependencies
  - dir ..\fifengine-dependencies\downloads
  - dir ..\fifengine-dependencies\includes /s

#before_build:
  # git sh.exe conflicts with MinGW makefiles
  #- if "%generator%"=="MinGW Makefiles" (set "PATH=%PATH:C:\Program Files\Git\usr\bin;=%")

build_script:
  - dir
  # create folder for an out-of-source-tree build: "c:\projects\build"
  - cd..
  - mkdir build
  - cd build
  # generate build script - SHARED LIB
  - >
    cmake ..\fifengine
    -G "%generator%"
    -DCMAKE_BUILD_TYPE=%configuration%
    -DCMAKE_INSTALL_PREFIX="c:/fife/install"
    -DBOOST_ROOT="%boost_root%"
    -DBOOST_LIBRARYDIR="%boost_librarydir%"
    -Dbuild-library=ON
    -DBUILD_SHARED_LIBS=ON
    -DCEGUI=ON
  # build
  - cmake --build . --target ALL_BUILD --config %configuration% -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
  # install
  - cmake --build . --target INSTALL --config %configuration%
  # generate build script - STATIC LIB
  - >
    cmake ..\fifengine
    -G "%generator%"
    -DCMAKE_BUILD_TYPE=%configuration%
    -DCMAKE_INSTALL_PREFIX="c:/fife/install"
    -DBOOST_ROOT="%boost_root%"
    -DBOOST_LIBRARYDIR="%boost_librarydir%"
    -Dbuild-library=ON
    -DBUILD_SHARED_LIBS=OFF
    -DCEGUI=ON
  # build
  - cmake --build . --target ALL_BUILD --config %configuration% -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
  # install
  - cmake --build . --target INSTALL --config %configuration%

after_build:
  - dir C:\projects\build\Release /s
  - if "%generator%"=="Visual Studio 15" (set COMPILER="VC15")
  #- if "%generator%"=="MinGW Makefiles"  (set COMPILER="MinGW")

  # package dependencies artifact
  - call %APPVEYOR_BUILD_FOLDER%\build\appveyor\copy-boost-to-includes.bat
  - cd C:\projects\fifengine-dependencies\includes
  - 7z a -tzip -mx9 "%APPVEYOR_BUILD_FOLDER%\libfife-dependencies-%APPVEYOR_BUILD_VERSION%-%COMPILER%-%platform%.zip"
  - appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\libfife-dependencies-%APPVEYOR_BUILD_VERSION%-%COMPILER%-%platform%.zip"

  # package libfife artifact
  - cd c:\fife\install
  - 7z a -tzip -mx9 "%APPVEYOR_BUILD_FOLDER%\libfife-%APPVEYOR_BUILD_VERSION%-%COMPILER%-%platform%.zip"
  - appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\libfife-%APPVEYOR_BUILD_VERSION%-%COMPILER%-%platform%.zip"

  # package Python Installer artifact
  #PyCEGUI installs its dlls itself
  - ps: copy-item "C:\projects\build\*.py" "$env:APPVEYOR_BUILD_FOLDER\engine\python\fife\" -force -recurse -Confirm:$False
  - ps: copy-item "C:\projects\build\Release\*.*" "$env:APPVEYOR_BUILD_FOLDER\engine\python\fife\" -force -recurse -Confirm:$False
  - ps: copy-item "C:\projects\fifengine-dependencies\includes\bin\*.dll" "$env:APPVEYOR_BUILD_FOLDER\engine\python\fife\" -force -recurse -Confirm:$False -Exclude $global:dll_excludes
  - ps: copy-item "C:\projects\fifengine-dependencies\includes\lib\x86\*.dll" "$env:APPVEYOR_BUILD_FOLDER\engine\python\fife\" -force -recurse -Confirm:$False
  - cd %APPVEYOR_BUILD_FOLDER%
  - python setup.py set_metadata --version=0.4.2 bdist_msi --target-version="%PYTHON_VERSION%"
  - python setup.py set_metadata --version=0.4.2 bdist_dumb --format=zip
  - dir %APPVEYOR_BUILD_FOLDER%\dist
  - appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\dist\libfife-0.4.2.win32-py%PYTHON_VERSION%.msi"
  - appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\dist\libfife-0.4.2.win32.zip"

  - dir C:\projects\build /s
  - dir "%APPVEYOR_BUILD_FOLDER%\engine\python\fife\" /s

artifacts:
  - path: 'libfife-dependencies-*.zip'
    name: Dependencies
  - path: 'libfife-*.zip'
    name: LibFife
  - path: 'dist\libfife-*py%PYTHON_VERSION%.msi'
    name: Python%PYTHON_VERSION%Installer
  - path: 'dist\libfife-0.4.2.win32.zip'
    name: Python%PYTHON_VERSION%-zip

# deploy to Github Releases on tag push
deploy:
  provider: GitHub
  release: 'Fifengine $(APPVEYOR_REPO_TAG_NAME)'
  tag: $(APPVEYOR_REPO_TAG_NAME)
  description: '[**Changelog**](https://github.com/fifengine/fifengine/blob/master/CHANGELOG.md)'
  artifact: Dependencies, LibFife, Python%PYTHON_VERSION%Installer, Python%PYTHON_VERSION%-zip
  draft: false
  prerelease: false
  force_update: true               # overwrite files of existing release on GitHub
  on:
    branch: master                 # release from master branch only
    appveyor_repo_tag: true        # deploy on tag push only
  auth_token:                      # encrypted token from GitHub
    secure: 4QuwNtXXqe6cIFwL3YCCn/47V7LdKBNbJVGjBSGDzJyUefOER3b7OrMrXm2FQYy3

on_finish:
  #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))