-
Notifications
You must be signed in to change notification settings - Fork 61
/
.appveyor.yml
176 lines (145 loc) · 6.18 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
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
version: '{build}'
init:
- git config --global core.autocrlf input
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/cor3ntin/1327dbf8aedab79f9fa305c001190268/raw/05155caad3a68c48be5f6873c3aca6ad8a30e31a/rdp.ps1'))
matrix:
fast_finish: true
skip_branch_with_pr: true
install:
- mkdir C:\projects\deps
- cd C:\projects\deps
# Install Bonjour
- 7z x "%APPVEYOR_BUILD_FOLDER%\third_party\bonjour\bonjoursdksetup.exe"
- if [%platform%]==[x64] cd C:\projects\deps && msiexec /i C:\projects\deps\Bonjour64.msi /qb /quiet
- if [%platform%]==[x64] cd C:\projects\deps && msiexec /i C:\projects\deps\BonjourSDK64.msi /qb /quiet
- if [%platform%]==[x86] cd C:\projects\deps && msiexec /i C:\projects\deps\Bonjour.msi /qb /quiet
- if [%platform%]==[x86] cd C:\projects\deps && msiexec /i C:\projects\deps\BonjourSDK.msi /qb /quiet
# Use msys packages for the mingw builds
- if [%COMPILER%]==[MinGW] (
%BASH% -lc "pacman -R catgets libcatgets --noconfirm"
)
- if [%COMPILER%]==[MinGW] if [%ARCH%]==[x86] %BASH% -lc "pacman --noconfirm -Sy -d mingw-w64-i686-{binutils,gcc,gcc-libs,cmake,qt5,qwt-qt5,libxml2,SDL2}"
- if [%COMPILER%]==[MinGW] if [%ARCH%]==[x64] %BASH% -lc "pacman --noconfirm -Sy -d mingw-w64-x86_64-{binutils,gcc,gcc-libs,cmake,qt5,qwt-qt5,libxml2,SDL2}"
# Install cmake
- if [%USE_VS_TOOLCHAIN%]==[true] (
cd C:\projects\deps &&
appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip &&
7z x cmake.zip -oC:\projects\deps > nul &&
move C:\projects\deps\cmake-* C:\projects\deps\cmake &&
set "PATH=C:\projects\deps\cmake\bin;%PATH%"
cmake --version
)
#Install LLVM to have a newer clang cl
- if [%COMPILER%]==[ClangCL] (
cd C:\projects\deps &&
appveyor DownloadFile %LLVM_URL% -FileName llvm.exe &&
7z x llvm.exe -oC:\projects\deps\llvm > nul &&
set "PATH=C:\projects\deps\llvm\bin;%PATH%" &&
set "LLD_LINK=C:\projects\deps\llvm\bin\lld-link.exe"
)
# Install SDL ( for msvc & clang)
- if [%USE_VS_TOOLCHAIN%]==[true] (
appveyor DownloadFile %SDL_URL% -FileName sdl.zip &&
7z x sdl.zip -oC:\projects\deps\sdl > nul
)
- appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
- 7z x ninja.zip -oC:\projects\deps\ninja > nul
- set "PATH=C:\projects\deps\ninja;%PATH%"
- ninja --version
# NSIS
- ps: |
if (Test-Path "C:/Program Files (x86)/NSIS/makensis.exe") {
echo "using nsis from cache"
} else {
choco install -y nsis.install
}
- set "PATH=%PATH%;C:\Program Files (x86)\NSIS"
# Blockly deps
- if [%USE_VS_TOOLCHAIN%]==[true] python -m pip install -U pip setuptools wheel
- if [%USE_VS_TOOLCHAIN%]==[true] python -m pip install beautifulsoup4 lxml
- if [%COMPILER%]==[MinGW] appveyor DownloadFile %https://bootstrap.pypa.io/get-pip.py% -FileName get-pip.py
- if [%COMPILER%]==[MinGW] (
%BASH% -x -lc "python2 get-pip.py --user && python2 -m pip install -U pip setuptools wheel && python2 -m pip install beautifulsoup4 lxml"
)
before_build:
- cd "%APPVEYOR_BUILD_FOLDER%"
- if [%USE_VS_TOOLCHAIN%]==[true] (
set "PATH=%QT5%\bin;%PATH%" &&
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH%
)
- git submodule init
- git submodule update --recursive --remote
- if NOT DEFINED APPVEYOR_PULL_REQUEST_NUMBER git clone https://github.com/aseba-community/thymio-blockly-standalone.git thymio-blockly-standalone --branch master --recurse-submodules
build_script:
- cd "%APPVEYOR_BUILD_FOLDER%"
- mkdir build
- cd build
- if [%COMPILER%]==[MinGW] if [%ARCH%]==[x86] set MinGWPath="/mingw32"
- if [%COMPILER%]==[MinGW] if [%ARCH%]==[x64] set MinGWPath="/mingw64"
- if [%COMPILER%]==[MinGW] (
%BASH% -x -lc "cd '%APPVEYOR_BUILD_FOLDER%\\build' && export PATH=\"%MinGWPath%/bin:${PATH}\" && cmake .. -GNinja -DBUILD_SHARED_LIBS=OFF -DCMAKE_PREFIX_PATH='%MinGWPath%;/c/Program Files/Bonjour SDK' && ninja -v"
)
- if [%COMPILER%]==[ClangCL] (
cmake .. -GNinja -DBUILD_SHARED_LIBS=OFF "-DCMAKE_TOOLCHAIN_FILE=%APPVEYOR_BUILD_FOLDER%\windows\clang-cl-toolchain.cmake" "-DCMAKE_LINKER=%LLD_LINK%" "-DCMAKE_PREFIX_PATH=%QT5%;C:\Program Files\Bonjour SDK" -DCMAKE_BUILD_TYPE=Release &&
ninja -v &&
ctest &&
cpack -D CPACK_GENERATOR="NSIS"
)
- if [%COMPILER%]==[MSVC] (
cmake .. -GNinja -DBUILD_SHARED_LIBS=OFF "-DCMAKE_TOOLCHAIN_FILE=%APPVEYOR_BUILD_FOLDER%\windows\cl-toolchain.cmake" "-DCMAKE_PREFIX_PATH=%QT5%;C:\Program Files\Bonjour SDK" -DCMAKE_BUILD_TYPE=Release &&
ninja -v &&
ctest &&
cpack -D CPACK_GENERATOR="NSIS"
)
artifacts:
- path: 'build\aseba-*.exe'
name: Aseba
cache:
- '%MSYS_CACHE%'
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
- 'C:\Program Files (x86)\NSIS'
image: Visual Studio 2017
platform: x64
environment:
NINJA_URL: https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip
SDL_URL: https://libsdl.org/release/SDL2-devel-2.0.7-VC.zip
CMAKE_URL: https://cmake.org/files/v3.8/cmake-3.8.0-win64-x64.zip
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=5"
matrix:
- ARCH: x86
QT5: C:\Qt\5.10\msvc2015
COMPILER: MSVC
USE_VS_TOOLCHAIN: true
- ARCH: x64
COMPILER: MSVC
QT5: C:\Qt\5.10\msvc2017_64
USE_VS_TOOLCHAIN: true
#- COMPILER: MinGW
#ARCH: x86
#BASH: C:\msys64\usr\bin\bash
#MSYS_CACHE: C:\msys64\var\cache\pacman\pkg
#- platform: x64
#COMPILER: MinGW
#ARCH: x64
#BASH: C:\msys64\usr\bin\bash
#MSYS_CACHE: C:\msys64\var\cache\pacman\pkg
- platform: x64
COMPILER: ClangCL
ARCH: x64
LLVM_URL: http://prereleases.llvm.org/win-snapshots/LLVM-7.0.0-r323406-win64.exe
LLVM_VERSION: 7.0
USE_VS_TOOLCHAIN: true
QT5: C:\Qt\5.10\msvc2017_64
deploy:
tag: nightly
release: nightly
description: 'Nightly Build'
provider: GitHub
auth_token:
secure: Xehpz2B9WwN2wOzHfWMBQ83W31YluiEz6s9LjOi+vOjHcMxnjYCk7mNdQhSFOuE9 # your encrypted token from GitHub
artifact: Aseba
prerelease: true
on:
branch: master
force_update: true