diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..332700bcd8 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,38 @@ +environment: + matrix: + - TARGET_ARCH: x64 + CONDA_PY: 27 + CONDA_INSTALL_LOCN: C:\\Miniconda-x64 + + - TARGET_ARCH: x64 + CONDA_PY: 36 + CONDA_INSTALL_LOCN: C:\\Miniconda35-x64 + +platform: + - x64 + +install: + # If there is a newer build queued for the same PR, cancel this one. + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` + throw "There are newer queued builds for this pull request, failing early." } + + # Add path, activate conda, update conda, and add conda-forge channel for the dependencies. + - cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat + - cmd: conda config --set always_yes yes --set changeps1 no --set show_channel_urls true + - cmd: conda update conda + - cmd: conda config --add channels conda-forge --force + - cmd: set PYTHONUNBUFFERED=1 + + # Fix conda bug when building vc 9. + - cmd: conda install conda-build vs2008_express_vc_python_patch + - cmd: call setup_x64 + # Debug info. + - cmd: conda info --all + - cmd: conda list + +# Skip .NET project specific build phase. +build: off + +test_script: diff --git a/conda.recipe/bld.bat b/conda.recipe/bld.bat new file mode 100644 index 0000000000..848cf95d88 --- /dev/null +++ b/conda.recipe/bld.bat @@ -0,0 +1,22 @@ +set PATH=%PATH%;C:\msys64\usr\bin + +mkdir %SRC_DIR%\build +cd %SRC_DIR%\build + +cmake -G "Visual Studio 15 Win64" ^ + -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -D BUILD_SHARED_LIBS=ON ^ + -D ENABLE_TESTS=ON ^ + -D ENABLE_HDF4=ON ^ + -D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ + -D ZLIB_LIBRARY=%LIBRARY_LIB%\zlib.lib ^ + -D ZLIB_INCLUDE_DIR=%LIBRARY_INC% ^ + -D CMAKE_BUILD_TYPE=Release ^ + %SRC_DIR% +if errorlevel 1 exit 1 + +cmake --build . --config Release || exit 1 + +ctest || exit 1 + +nmake install || exit 1 diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml new file mode 100644 index 0000000000..bf0f2751d3 --- /dev/null +++ b/conda.recipe/meta.yaml @@ -0,0 +1,33 @@ + +{% set version = "dev" %} + +package: + name: netcdf-c + version: {{ version }} + +source: + path: ../ + +build: + features: + - vc9 # [win and py27] + - vc14 # [win and py>=35] + +requirements: + build: + - python # Here only to activate the `vc`s. + - msinttypes + - curl + - zlib 1.2.* + - hdf4 + - hdf5 1.8.20 + - vc 15 # [win and py>=35] + run: + - curl + - zlib 1.2.* + - hdf4 + - hdf5 1.8.20 + - vc 15 # [win and py>=35] + +test: + commands: