This repository has been archived by the owner on Oct 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 217
/
.appveyor.yml
62 lines (55 loc) · 2.17 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
image: Visual Studio 2017
environment:
MSYSTEM: MINGW64 # use MSYS2 shell
matrix:
- CFG: MINGW64
UPLOAD: ON
- CFG: MSVC
cache: c:\tools\vcpkg\installed\
install:
# upgrade git for vcpkg: https://github.com/appveyor/ci/issues/2097
- if %CFG% == MSVC (choco upgrade git -y & vcpkg install mpir:x64-windows)
build_script:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- cd %APPVEYOR_BUILD_FOLDER% && mkdir build && cd build
# disable slow LTO
- if %CFG% == MSVC (cmake ../src
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DLEAN_EXTRA_CXX_FLAGS=/GL-
-DLEAN_EXTRA_LINKER_FLAGS_MSVC=/LTCG:OFF
-G "NMake Makefiles" &&
cmake --build .)
- if %CFG% == MINGW64 (C:\msys64\usr\bin\bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/build &&
OPTIONS='';
if [[ $APPVEYOR_SCHEDULED_BUILD == True ]]; then . ../script/setup_nightly.sh; fi &&
cmake ../src -DINCLUDE_MSYS2_DLLS=ON -DCMAKE_BUILD_TYPE=Release $OPTIONS -G 'Unix Makefiles' &&
cmake --build . &&
cpack")
test_script:
- C:\msys64\usr\bin\bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/build && ctest -j4 --output-on-failure"
# don't test packages when building nightly
- C:\msys64\usr\bin\bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER/packages &&
if [[ ! -f ../build/nightly.sh ]]; then
../bin/leanpkg configure &&
for d in _target/deps/*; do (cd $d; ../../../../bin/leanpkg test || exit 1); done;
fi"
- C:\msys64\usr\bin\bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER &&
if [[ $UPLOAD == ON && $GH_TOKEN && $APPVEYOR_REPO_BRANCH == master && -f build/nightly.sh ]]; then
. build/nightly.sh &&
bash script/deploy_nightly.sh build/lean-*-windows.zip;
fi"
artifacts:
- path: build\lean-*-windows.zip
name: binary
deploy:
description: 'Lean release'
provider: GitHub
auth_token:
secure: d+yPrDEAbiNrcf3a0PDNYEn/ieOOP6M7cP9zje+QkJEjHFdjBjWMe8b3qrC1hrus
artifact: binary
draft: false
prerelease: false
on:
appveyor_repo_tag: true
UPLOAD: ON