forked from equinor/segyio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
99 lines (85 loc) · 2.72 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
version: 1.0.{build}
clone_depth: 1
configuration:
- Release
os: Visual Studio 2015
image: Visual Studio 2015
platform:
- x86
- x64
environment:
MEX: -DBUILD_MEX=OFF
INSTALL_DIR: C:\projects\segyio-install
TWINE_PASSWORD:
secure: kTga6+rLL1fNpKqFNcX0QZNyqiYaHsEfSS4k6wvUoTE=
matrix:
- PYTHON: C:\Python27
LANG: -DBUILD_PYTHON=ON
PYTHON_VERSION: 27
- PYTHON: C:\Python35
LANG: -DBUILD_PYTHON=ON
PYTHON_VERSION: 35
- PYTHON: C:\Python36
LANG: -DBUILD_PYTHON=ON
PYTHON_VERSION: 36
- PYTHON: C:\Python37
LANG: -DBUILD_PYTHON=ON
PYTHON_VERSION: 37
- PYTHON: C:\Python38
LANG: -DBUILD_PYTHON=ON
PYTHON_VERSION: 38
matrix:
fast_finish: true
install:
- git submodule update --init --recursive
- IF DEFINED PYTHON (IF "%platform%" == "x64" SET PYTHON=%PYTHON%-x64)
- IF DEFINED PYTHON SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- IF DEFINED PYTHON pip install -r requirements.txt
- IF DEFINED PYTHON pip install
twine
wheel
setuptools
setuptools-scm
pytest
pytest-runner
scikit-build
before_build:
- IF DEFINED PYTHON SET LANG=%LANG% -DPYTHON_EXECUTABLE=%PYTHON%\python
- set generator="Visual Studio 14 2015"
- IF "%platform%" == "x64" set generator="Visual Studio 14 2015 Win64"
- git fetch --tags
build_script:
- mkdir build
- ps: pushd build
- cmake %APPVEYOR_BUILD_FOLDER%
-G %generator%
%MEX%
%LANG%
-DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%
-DCMAKE_CXX_FLAGS="/D_CRT_SECURE_NO_WARNINGS /EHsc"
- cmake --build . --config "%configuration%" --target install
- ctest -C "%configuration%" --output-on-failure
- ps: popd
- ps: pushd python
- IF DEFINED PYTHON python setup.py bdist_wheel -G %generator%
- ps: popd
test_script:
- set PATH=%INSTALL_DIR%\bin;%PATH%
- ps: pushd python
- IF DEFINED PYTHON FOR /F "tokens=*" %%G IN ('dir /b dist\*.whl') DO
pip install dist/%%G
- ps: popd
- IF DEFINED PYTHON python -c
"import segyio;f=segyio.open('test-data/small.sgy');print(f.ilines)"
- IF DEFINED PYTHON python python/examples/scan_min_max.py test-data/small.sgy
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) }