|
| 1 | +environment: |
| 2 | + CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 |
| 3 | + TARGET_ARCH: x64 |
| 4 | + CONDA_PY: 36 |
| 5 | + SRC_DIR: C:\projects\nco |
| 6 | + |
| 7 | +platform: |
| 8 | + - x64 |
| 9 | + |
| 10 | +image: |
| 11 | + - Visual Studio 2015 |
| 12 | + |
| 13 | +init: |
| 14 | + # We need to define these b/c we are not using conda-build. |
| 15 | + - "ECHO %MINICONDA%" |
| 16 | + - if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" set VCVARPATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" |
| 17 | + - if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" set VCARGUMENT=%PLATFORM% |
| 18 | + - if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Previous Visual Studio 2017" if "%PLATFORM%" == "x64" set VCVARPATH="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" |
| 19 | + - echo "%VCVARPATH% %VCARGUMENT%" |
| 20 | + - "%VCVARPATH% %VCARGUMENT%" |
| 21 | + |
| 22 | +install: |
| 23 | + # If there is a newer build queued for the same PR, cancel this one. |
| 24 | + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` |
| 25 | + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` |
| 26 | + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` |
| 27 | + throw "There are newer queued builds for this pull request, failing early." } |
| 28 | + |
| 29 | + # Add path, activate `conda` and update conda. |
| 30 | + - cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat |
| 31 | + - cmd: conda.exe config --set always_yes yes --set changeps1 no --set show_channel_urls true |
| 32 | + - cmd: conda.exe update conda |
| 33 | + - cmd: conda.exe config --remove channels defaults --force |
| 34 | + - cmd: conda.exe config --add channels conda-forge --force |
| 35 | + - cmd: set PYTHONUNBUFFERED=1 |
| 36 | + |
| 37 | + - cmd: conda.exe create --name TEST python=%PY% cmake antlr=2.7.7 curl expat gsl hdf5 libnetcdf udunits2 zlib |
| 38 | + - cmd: conda activate TEST |
| 39 | + |
| 40 | + - cmd: conda.exe info --all |
| 41 | + - cmd: conda.exe list |
| 42 | + |
| 43 | +# Skip .NET project specific build phase. |
| 44 | +build: off |
| 45 | + |
| 46 | +test_script: |
| 47 | + # Build |
| 48 | + - build.cmd |
| 49 | + # Tests |
| 50 | + - ncks --help |
| 51 | + - ncap2 --help |
| 52 | + - ncks -M "http://tds.marine.rutgers.edu/thredds/dodsC/roms/espresso/2013_da/his/ESPRESSO_Real-Time_v2_History_Best" || exit 1 |
| 53 | + - cd %SRC_DIR%\data |
| 54 | + - ncgen -o in.nc in.cdl || exit 1 |
| 55 | + - ncks -H --trd -v one in.nc || exit 1 |
| 56 | + - ncap2 -O -v -s "erf_one=float(gsl_sf_erf(1.0f));" in.nc foo.nc || exit 1 |
| 57 | + - ncks -v erf_one foo.nc || exit 1 |
0 commit comments