forked from equinor/dlisio
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
108 lines (92 loc) · 3.27 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
version: 1.0.{build}
configuration:
- Release
os: Visual Studio 2019
image: Visual Studio 2019
platform:
- x86
- x64
environment:
TWINE_PASSWORD:
secure: l6EOt89SzIItVoVNEMhf/fhrJ0o+HVNn0vQmE0Opt9Y=
matrix:
- PYTHON: C:\Python36
PYTHON_VERSION: 36
- PYTHON: C:\Python37
PYTHON_VERSION: 37
- PYTHON: C:\Python38
PYTHON_VERSION: 38
- PYTHON: C:\Python39
PYTHON_VERSION: 39
matrix:
fast_finish: true
install:
- IF DEFINED PYTHON (IF "%platform%" == "x64" SET PYTHON=%PYTHON%-x64)
- IF DEFINED PYTHON SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- IF DEFINED PYTHON pip install --upgrade pip --user
- IF DEFINED PYTHON pip install --upgrade
twine
wheel
- IF DEFINED PYTHON pip install --upgrade -r python/requirements-dev.txt
# updates in 0.12 make building 64-bit version on Appveyor fail
- IF DEFINED PYTHON pip install scikit-build==0.11.0 --force-reinstall
before_build:
- set generator="Visual Studio 14 2015"
- IF "%platform%" == "x64" set generator="Visual Studio 14 2015 Win64"
- git fetch --tags
- set install-dir=C:/Program Files
- IF "%platform%" == "x86" set install-dir=C:/Program Files (x86)
- git clone https://github.com/fmtlib/fmt.git
- ps: mkdir fmt/build
- ps: pushd fmt/build
- git checkout 7.1.3
- cmake -G %generator%
-DFMT_TEST=OFF
-DFMT_DOC=OFF ..
- cmake --build . --config %configuration% --target install
#- set fmt_DIR=%install-dir%/fmt/lib/cmake/fmt
- ps: popd
- git clone https://github.com/equinor/layered-file-protocols.git
- ps: mkdir layered-file-protocols/build
- ps: pushd layered-file-protocols/build
- cmake -G %generator%
-DCMAKE_CXX_FLAGS="/D_CRT_SECURE_NO_WARNINGS"
-DLFP_FMT_HEADER_ONLY=ON
-DCMAKE_BUILD_TYPE=Release ..
- cmake --build . --config %configuration% --target install
- set lfp_DIR=%install-dir%/layered-file-protocols/share/lfp/cmake
- ps: popd
- git clone https://github.com/mpark/variant.git
- ps: mkdir variant/build
- ps: pushd variant/build
- cmake -G %generator%
-DCMAKE_CXX_FLAGS="/D_CRT_SECURE_NO_WARNINGS"
-DCMAKE_BUILD_TYPE=Release ..
- cmake --build . --config %configuration% --target install
- set mpark_variant_DIR=%install-dir%/Mpark.Variant/lib/cmake/mpark_variant
- ps: popd
build_script:
- ps: |
mkdir build
pushd build
- cmake %APPVEYOR_BUILD_FOLDER%
-G %generator%
-DCMAKE_CXX_FLAGS="/D_CRT_SECURE_NO_WARNINGS"
- cmake --build . --config %configuration%
- ctest --build-config %configuration% --verbose
- ps: popd
- ps: pushd python
- git describe
- IF DEFINED PYTHON python setup.py bdist_wheel -G %generator%
- ps: popd
before_deploy:
- ps: pushd python
after_deploy:
- ps: popd
deploy_script:
- ps: |
Write-Host "TAG: $env:APPVEYOR_REPO_TAG"
If ($env:APPVEYOR_REPO_TAG -eq "false") { return }
Write-Host "Uploading wheels to pypi"
Invoke-Expression "twine upload -u statoil-travis --skip-existing dist/*"
If ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }