forked from OpenWaterAnalytics/EPANET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
92 lines (77 loc) · 2.21 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
#
# appveyor.yml - Appveyor CI configuration for OWA EPANET
#
version: 2.0.{build}
matrix:
allow_failures:
#GROUP: (SUPPORTED/EXPERIMENTAL)
#EXPERIMENTAL is allowed to fail under build matrix
- GROUP: "EXPERIMENTAL"
environment:
BUILD_HOME: "buildprod"
TEST_HOME: "nrtestsuite"
PYTHON: "C:\\Python36-x64"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
GENERATOR: "Visual Studio 15 2017"
GROUP: "SUPPORTED"
BOOST_ROOT: "C:/Libraries/boost_1_67_0"
PLATFORM: "win32"
REF_BUILD_ID: "local"
# New build on Visual Studio 15 2017
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
GENERATOR: "Visual Studio 15 2017 Win64"
GROUP: "EXPERIMENTAL"
BOOST_ROOT: "C:/Libraries/boost_1_67_0"
PLATFORM: "win64"
REF_BUILD_ID: "local"
# called before repo cloning
init:
- set SUT_BUILD_ID=%APPVEYOR_BUILD_NUMBER%_%APPVEYOR_JOB_NUMBER%
- set EPANET_HOME=%APPVEYOR_BUILD_FOLDER%
- set PATH=%PATH%;%BOOST_ROOT%/
# See values set
- echo %APPVEYOR_BUILD_WORKER_IMAGE%
- echo %BUILD_HOME%
- echo %TEST_HOME%
- echo %GENERATOR%
- echo %BOOST_ROOT%
# called after repo clone
install:
- set "PATH=%PYTHON%;%PYTHON%\Scripts;%PYTHON%\Library/bin;%path%"
- "%PYTHON%\\python.exe --version"
- "%PYTHON%\\python.exe -m pip install -r scripts\\requirements-appveyor.txt"
# called before build
before_build:
- mkdir %BUILD_HOME%
- cd %BUILD_HOME%
- cmake -G "%GENERATOR%"
-DBUILD_TESTS=ON
-DBOOST_ROOT="%BOOST_ROOT%" ..
# run custom build script
build_script:
- cmake --build . --config Release --target install
after_build:
- cpack
before_test:
- cd %EPANET_HOME%
- scripts\before-nrtest.cmd
# run custom test script
test_script:
# run unit tests
- cd %BUILD_HOME%
- ctest -C Release --output-on-failure
# run regression tests
- cd %EPANET_HOME%
- scripts\run-nrtest.cmd %APPVEYOR_REPO_COMMIT% %SUT_BUILD_ID%
on_success:
- cd %TEST_HOME%\benchmark
- appveyor PushArtifact receipt.json
on_failure:
- cd %TEST_HOME%\benchmark
# zip up the SUT benchmarks
- 7z a benchmark-%PLATFORM%.zip .\epanet-%SUT_BUILD_ID%
- appveyor PushArtifact benchmark-%PLATFORM%.zip
artifacts:
- path: '%BUILD_HOME%\epanet-solver-*.zip'
name: SUT-package