-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy path.appveyor.yml
103 lines (85 loc) · 3.85 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
# add by martinec
# based on http://www.appveyor.com/docs/appveyor-yml
# validated on https://ci.appveyor.com/tools/validate-yaml
#
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
# version format
version: '#{build}'
os: Visual Studio 2019
# to disable automatic tests
# test: off
# clone folder
clone_folder: C:\projects\unitex-core
skip_commits:
# commits that have [ci skip] anywhere in the commit messages are ignored
message: /.*\[ci skip\].*/
# scripts that are called at very beginning, before repo cloning
init:
# fix line endings on Windows
- git config --global core.autocrlf true
# fetch repository as zip archive
# shallow_clone: true
# set clone depth
clone_depth: 3
#environment:
# matrix
# # immediately finish build once one job fails
# fast_finish: true
#platform:
## - x86
# - x64
## - Any CPU
## build Configuration
# configuration: Debug
## build the binary after tests
# build: off
#build:
# parallel: true
# project: build/Unitex4_vs2019.sln
# verbosity: detailed
#
# Install needed build dependencies
#
install:
- '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64'
- cd C:\projects\unitex-core\src
- set PATH=%PATH%;C:\Program Files\7-Zip\
- 7z x C:\projects\unitex-core\src\vendor\tre-0.8.0.tar.gz -so | 7z x -si -ttar > nul
- 7z x C:\projects\unitex-core\src\vendor\yaml-0.1.6.tar.gz -so | 7z x -si -ttar > nul
- 7z x C:\projects\unitex-core\src\vendor\luajit-2.3.0.tar.gz -so | 7z x -si -ttar > nul
- patch -i C:\projects\unitex-core\src\vendor\patches\luajit-2.3.0\luaconf.h.patch luajit-2.3.0/src/luaconf.h
- cd C:\projects\unitex-core\src\luajit-2.3.0\src
- set LUA_PATH_DEFAULT=".\\\\?.lua;!\\\\..\\\\..\\\\?.lua;!\\\\..\\\\..\\\\?\\\\init.lua;.\\\\?.upp;!\\\\..\\\\..\\\\?.upp;!\\\\..\\\\..\\\\?\\\\init.upp"
- set LUA_CPATH_DEFAULT=".\\\\?.dll;!\\\\lib\\\\?.dll"
- msvcbuild static
- mkdir C:\projects\unitex-core\src\luajit-2.3.0\include
- cp lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h C:\projects\unitex-core\src\luajit-2.3.0\include
- cp lua51.lib luajit.lib C:\projects\unitex-core\src\build
build_script:
- cd C:\projects\unitex-core\src\build
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- set MSBuildOptions=/v:m /t:Unitex4_vs2019 /p:Configuration=Debug /logger:%MSBuildLogger%
- msbuild %MSBuildOptions% Unitex4_vs2019.sln
# scripts to run before tests
before_test:
- git clone -b master --depth 1 https://github.com/UnitexGramLab/unitex-core-tests
# to run our custom script instead of the automatic test
test_script:
- cp "C:\projects\unitex-core\src\build\x64\Unitex4_vs2019\Debug\tmp\UnitexToolLogger.exe" "C:\projects\unitex-core\src\build\unitex-core-tests\UnitexToolLogger.exe"
- C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; export UNITEX_CORE_VERSION_GIT_COMMIT_HASH=$(git describe --always HEAD); UNITEX_BIN=$APPVEYOR_BUILD_FOLDER/src/build/unitex-core-tests/UnitexToolLogger; cd $APPVEYOR_BUILD_FOLDER/src/build/unitex-core-tests; mkdir -p elg && touch elg/init.upp; ./unitex-core-test.sh -c0 -w60 -p1 Locate"
notifications:
# Email
- provider: Email
to:
on_build_success: false
on_build_failure: true
on_build_status_changed: true
- provider: Slack
# variables from eventData on https://www.appveyor.com/docs/notifications#webhook-payload
template: "Build <{{buildUrl}}|{{buildVersion}}> (<{{commitUrl}}|{{commitId}}>) of {{repositoryName}}@{{branch}} by {{commitAuthor}} {{status}} in {{duration}}"
incoming_webhook:
# encrypted with https://ci.appveyor.com/tools/encrypt
secure: ZCn/FzQ0KC70XIvB5pP8zFzcOtPK6IeGybrxv/fPA1mlrAWvQobqE5NS2A2yYSeVX4tAaFpHHCWm744o9qKahzCeRfVOE0Z0+PTTqjOLUaU=