-
Notifications
You must be signed in to change notification settings - Fork 89
/
.appveyor.yml
111 lines (92 loc) · 3.39 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
#---------------------------------#
# general configuration #
#---------------------------------#
version: latest-{build}-{branch}
branches:
only:
- develop
- master
image: Visual Studio 2022
environment:
CONDA: c:\Miniconda37-x64
ECMWF: c:\ecmwf
GIT_CLONE_DIR: $(ECMWF)\git
INSTALL_DIR: $(ECMWF)\install
ECCODES_SRC: $(GIT_CLONE_DIR)\eccodes
WINDOWS_TESTING_BASHRC: $(ECCODES_SRC)\tests\windows_testing.bashrc
ECBUILD_SRC: $(GIT_CLONE_DIR)\ecbuild
# scripts that are called at very beginning, before repo cloning
init:
# make sure git clones symlinks as symlinks
- cmd: git config --global core.symlinks true
# activate conda environment so the tests can find linux utils
- cmd: call %CONDA%\Scripts\activate.bat
# add eccodes\build\bin to path so tests can find eccodes.dll
- cmd: set PATH=%PATH%;%ECCODES_SRC%\build\bin
# auto-yes for conda
- cmd: conda config --set always_yes yes
clone_folder: $(ECCODES_SRC)
clone_depth: 1
# scripts that run after cloning repository
install:
# install ecbuild
- cmd: git clone --depth 1 https://github.com/ecmwf/ecbuild.git %ECBUILD_SRC% --branch %APPVEYOR_REPO_BRANCH%
# install linux utils
- cmd: conda install -c msys2 m2-bash ^
m2-findutils ^
m2-coreutils ^
m2-grep ^
m2-sed ^
m2-gawk ^
m2-diffutils ^
m2-perl ^
m2w64-ntldd-git
# get deps. Drop libnetcdf
- cmd: conda install -c conda-forge cmake libaec
#---------------------------------#
# build configuration #
#---------------------------------#
platform:
- x64
before_build:
- cmd: call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
# Building with libaec fails. When any executable runs, we get:
# error while loading shared libraries: ?: cannot open shared object file: No such file or directory
# So we have to disable AEC
build_script:
- cmd: cd %ECCODES_SRC%
- cmd: mkdir build && cd build
- cmd: cmake -G "NMake Makefiles" ^
-D CMAKE_INSTALL_PREFIX=%INSTALL_DIR% ^
-D CMAKE_BUILD_TYPE=Release ^
-D ENABLE_FORTRAN=0 ^
-D ENABLE_NETCDF=0 ^
-D ENABLE_JPG=1 ^
-D ENABLE_AEC=0 ^
-D IEEE_LE=1 ^
-D ENABLE_MEMFS=1 ^
-D ENABLE_EXTRA_TESTS=ON ^
-D WINDOWS_TESTING_BASHRC=%WINDOWS_TESTING_BASHRC% ^
..
- cmd: nmake
- cmd: ctest --output-on-failure
- cmd: nmake install
#---------------------------------#
# tests configuration #
#---------------------------------#
test_script:
- cmd: codes_info
# Note: With ENABLE_MEMFS=1, there will be no installed definition files/samples
# - cmd: for /F "tokens=* USEBACKQ" %%F IN (`codes_info -s`) DO (ls %%F)
# - cmd: for /F "tokens=* USEBACKQ" %%F IN (`codes_info -d`) DO (ls %%F)
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
# Email
- provider: Email
to:
subject: 'Build {{status}}' # optional
message: "{{message}}, {{commitId}}, ..." # optional
on_build_success: false