mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-19 17:30:27 +08:00
Attempting appveyor support. Based on work by @ocefpaf, see https://github.com/Unidata/netcdf-c/pull/347 for more information.
This commit is contained in:
parent
d1807582c2
commit
f216710499
38
appveyor.yml
Normal file
38
appveyor.yml
Normal file
@ -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:
|
22
conda.recipe/bld.bat
Normal file
22
conda.recipe/bld.bat
Normal file
@ -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
|
33
conda.recipe/meta.yaml
Normal file
33
conda.recipe/meta.yaml
Normal file
@ -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:
|
Loading…
x
Reference in New Issue
Block a user