forked from Mobsya/aseba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
152 lines (126 loc) · 5.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
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
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:
- cd "%APPVEYOR_BUILD_FOLDER%"
- ps: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
- if ["%APPVEYOR_PULL_REQUEST_NUMBER%"]==[""] appveyor-tools\secure-file -decrypt %SIGNTOOL_PFX%.enc -secret %PFX_SECURE_FILE_DECODE%
- mkdir C:\projects\deps
- cd C:\projects\deps
# 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"
)
- 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"
- cd "%APPVEYOR_BUILD_FOLDER%"
- appveyor DownloadFile https://github.com/Mobsya/scratch-gui/releases/download/v20190606.2/scratch-gui.tar.gz -FileName scratch-gui.tar.gz
- appveyor DownloadFile https://github.com/Mobsya/thymio-blockly-standalone/releases/download/v20190507.3/thymio-blockly.tar.gz -FileName thymio-blockly.tar.gz
- 7z e thymio-blockly.tar.gz && 7z x thymio-blockly.tar
- 7z e scratch-gui.tar.gz && 7z x scratch-gui.tar
- refreshenv
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 update --init --recursive
- vcpkg install openssl:x86-windows-static openssl:x64-windows-static zlib:x86-windows-static zlib:x64-windows-static
build_script:
#Scratch
- cd "%APPVEYOR_BUILD_FOLDER%"
- mkdir build
- cd build
- if [%COMPILER%]==[ClangCL] (
cmake .. -GNinja "-DBoost_DEBUG=ON" -DBUILD_SHARED_LIBS=OFF "-DBOOST_ROOT=%BOOST_ROOT%" "-DBOOST_INCLUDEDIR=%BOOST_ROOT%/boost" "-DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR%" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILEE=%APPVEYOR_BUILD_FOLDER%\windows\clang-cl-toolchain.cmake" "-DCMAKE_LINKER=%LLD_LINK%" "-DCMAKE_PREFIX_PATH=%QT5%" "-DVCPKG_TARGET_TRIPLET=%ARCH%-windows-static" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_TESTS=OFF -DCREATE_QT_CONF_FILE=ON &&
ninja -v &&
cpack -D CPACK_GENERATOR="NSIS"
)
- if [%COMPILER%]==[MSVC] (
cmake .. -GNinja -DBoost_DEBUG=ON -DBUILD_SHARED_LIBS=OFF "-DBOOST_ROOT=%BOOST_ROOT%" "-DBOOST_INCLUDEDIR=%BOOST_ROOT%/boost" "-DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR%" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=%APPVEYOR_BUILD_FOLDER%\windows\cl-toolchain.cmake" "-DCMAKE_PREFIX_PATH=%QT5%;" -DCMAKE_BUILD_TYPE=Release "-DVCPKG_TARGET_TRIPLET=%ARCH%-windows-static"
-DCREATE_QT_CONF_FILE=ON &&
ninja -v &&
ctest &&
cpack -D CPACK_GENERATOR="NSIS"
)
artifacts:
- path: 'build\ThymioSuite-*.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://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-win64-x64.zip
SIGNTOOL_PFX: '%APPVEYOR_BUILD_FOLDER%\windows\appveyor\mobsya.pfx'
PFX_SECURE_FILE_DECODE:
secure: WHOG4xjSEoHk00wq+NAwiQ==
SIGNTOOL_PASSPHRASE:
secure: 3h/VH0p48X8zQ9cnqgpJt9yAF2/eGx+Ne8mpDXJmKaM=
#CMake expect forward slashes (see https://gitlab.kitware.com/cmake/cmake/issues/16816)
BOOST_ROOT: 'C:\Libraries\boost_1_69_0'
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=5"
matrix:
#- platform: x64
#COMPILER: ClangCL
#ARCH: x64
#LLVM_URL: http://releases.llvm.org/7.0.1/LLVM-7.0.1-win64.exe
#LLVM_VERSION: 7.0
#USE_VS_TOOLCHAIN: true
#QT5: C:\Qt\5.11\msvc2017_64
#BOOST_LIBRARYDIR: 'C:/Libraries/boost_1_69_0/lib64-msvc-14.1'
#- ARCH: x86
#QT5: C:\Qt\5.10\msvc2015
#COMPILER: MSVC
#USE_VS_TOOLCHAIN: true
#BOOST_LIBRARYDIR: 'C:/Libraries/boost_1_67_0/lib32-msvc-14.1'
- ARCH: x64
COMPILER: MSVC
QT5: C:\Qt\5.11\msvc2017_64
USE_VS_TOOLCHAIN: true
BOOST_LIBRARYDIR: 'C:/Libraries/boost_1_69_0/lib64-msvc-14.1'
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