Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AppVeyor testing for Windows #347

Closed
wants to merge 22 commits into from
Closed

Conversation

ocefpaf
Copy link

@ocefpaf ocefpaf commented Jan 10, 2017

To help testing on Windows I put together this appveyor.yml file that builds netcfd-c with conda and cmake. The reason I chose conda is to easily get all the dependencies (curl, hdf4, hdf5, and zlib). However, in order to get this PR working, we need to figure out a way to use AppVeyor's cygwin macro language (m4) to provide the auto-generated source files. (Or those files could be committed into the repo?)

PS: The repo adims must activate AppVeyor. Here is the first run on my account: https://ci.appveyor.com/project/ocefpaf/netcdf-c/build/1.0.8

@ocefpaf
Copy link
Author

ocefpaf commented Jan 11, 2017

It seems that the msys2 present in AppVeyor was all we needed to get the build to complete.

https://ci.appveyor.com/project/ocefpaf/netcdf-c/build/1.0.13

This can be improved to run some tests too, right now it only builds the master branch using 3 versions of Visual Studio (vc 9, 10, and 14).

cc @dopplershift who may be interested in this PR.

@dopplershift
Copy link
Member

I added netcdf-c to Unidata's AppVeyor, and have given Unidata's netCDF team what should be proper permissions.

Power-cycling the PR to hopefully get AppVeyor to run.

@WardF
Copy link
Member

WardF commented Jan 31, 2017

Thanks @dopplershift for jumping in on this!

@dopplershift
Copy link
Member

Well, the infrastructure works--but the build failed.

@WardF
Copy link
Member

WardF commented Jan 31, 2017

I'll dig into it but at a glance it looks like it is using visual studio 9, which is not a version we have tested against. I know that a lot of effort goes into supporting versions 11 and 12, as there are differences from 14 (the latest, I think). I'll look and figure out the specifics.

@dopplershift
Copy link
Member

What's strange it that it worked for @ocefpaf's.

@WardF
Copy link
Member

WardF commented Jan 31, 2017

It may be environmental; I see the following:

ncgen.l(123) : error C2065: '_FILLVALUE' : undeclared identifier
ncgen.l(123) : error C2099: initializer is not a constant
ncgen.l(124) : error C2065: '_FORMAT' : undeclared identifier
ncgen.l(124) : error C2099: initializer is not a constant
ncgen.l(125) : error C2065: '_STORAGE' : undeclared identifier
ncgen.l(125) : error C2099: initializer is not a constant
ncgen.l(126) : error C2065: '_CHUNKSIZES' : undeclared identifier

This suggests a header isn't being seen for some reason. It could be environmental, or maybe something in cmake? I'm not certain, yet, I'll have to look. It could also be due to missing tools, potentially. I'm not sure what this config requires installs, but both m4 and yacc/bison/flex are required to generate some of the files. If they aren't being installed, maybe that could cause this?

@DennisHeimbigner
Copy link
Collaborator

Remember that ncgen.l and ncgen.y should not be scanned because
they are used to generate ncgenl.[ch] and ncgeny.[ch].
Make sure that it is the latter files that are being scanned and not ncgen.l and ncgen.y

@ocefpaf
Copy link
Author

ocefpaf commented Feb 1, 2017

What's strange it that it worked for @ocefpaf's.

The test passed up until ocefpaf@fd2911a

See https://ci.appveyor.com/project/ocefpaf/netcdf-c/history

PS: Note that this PR implementes only a "can we build this" kind of test. Additional real tests should be added later.

test:
commands:
- ncdump -h http://geoport-dev.whoi.edu/thredds/dodsC/estofs/atlantic
# FIXME: the next two are failing at the moment.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@rsignell-usgs rsignell-usgs Feb 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thes URLS are either not reliable (geoport-dev.whoi.edu) or cycle off (the GFS URL with a specific date).
This could be a good one as:

  1. It's at Unidata
  2. It doesn't reference a model resolution that may disappear someday (e.g. 0.5=>0.25) and it doesn't specify a particular date
ncdump -h http://thredds.ucar.edu/thredds/dodsC/grib/NCEP/WW3/Global/Best

IMHO, it's not useful to do more than one of these.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed we need reliable endpoints for a robust test. Here I only gather the URLs I knew were failing. Before we merge this we can try to find, or create, some stable ones.

test:
commands:
- ncdump -h http://geoport-dev.whoi.edu/thredds/dodsC/estofs/atlantic
# FIXME: the next two are failing at the moment.
Copy link

@rsignell-usgs rsignell-usgs Feb 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thes URLS are either not reliable (geoport-dev.whoi.edu) or cycle off (the GFS URL with a specific date).
This could be a good one as:

  1. It's at Unidata
  2. It doesn't reference a model resolution that may disappear someday (e.g. 0.5=>0.25) and it doesn't specify a particular date
ncdump -h http://thredds.ucar.edu/thredds/dodsC/grib/NCEP/WW3/Global/Best

IMHO, it's not useful to do more than one of these.

@dopplershift
Copy link
Member

@rsignell-usgs But is it currently broken on windows with 4.4.1.1?

@rsignell-usgs
Copy link

rsignell-usgs commented Feb 17, 2017

Okay, actually, the latest libnetcdf and netcdf4 on my win64 are WORKING with both a local 5GB file and with this URL:

url = 'http://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GFS/Global_0p5deg/GFS
_Global_0p5deg_20170217_1200.grib2'

Here's my config:

(netcdf4b) C:\Users\rsignell\Downloads>conda list -e
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: win-64
certifi=2017.1.23=py36_0
curl=7.52.1=vc14_0
hdf4=4.2.12=vc14_0
hdf5=1.8.17=vc14_9
jpeg=9b=vc14_0
libnetcdf=4.4.1.1=vc14_2
mkl=2017.0.1=0
netcdf4=1.2.7=np111py36_0
numpy=1.11.3=py36_0
pip=9.0.1=py36_0
python=3.6.0=2
setuptools=33.1.0=py36_0
vc=14=0
vs2015_runtime=14.0.25420=0
wheel=0.29.0=py36_0
wincertstore=0.2=py36_0
zlib=1.2.11=vc14_0

@dopplershift
Copy link
Member

I don't think you finished that thought...

@DennisHeimbigner
Copy link
Collaborator

Where is that geoport reference coming from? The only occurrence
in netcdf-c is in .ncdap_test/test_nstride_cached.c and that one is
commented out.

@rsignell-usgs
Copy link

@DennisHeimbigner that was just a test for the conda recipe.

@ocefpaf
Copy link
Author

ocefpaf commented May 22, 2017

Latest source is no longer build on Windows for Python 2.7 (vc9) and Python 3.4 (vc10). This is currently a blocker to build netcdf4-python on anything but Python 3.5 and 3.6.

See https://ci.appveyor.com/project/ocefpaf/netcdf-c/build/1.0.23

@ocefpaf
Copy link
Author

ocefpaf commented Jun 12, 2017

Latest source broke all vcs available in AppVeyor.

https://ci.appveyor.com/project/ocefpaf/netcdf-c/build/1.0.25

@WardF WardF added this to the 4.5.1 milestone Jul 6, 2017
@WardF WardF self-assigned this Jul 6, 2017
@CLAassistant
Copy link

CLAassistant commented Oct 21, 2017

CLA assistant check
All committers have signed the CLA.

@WardF WardF modified the milestones: 4.6.0, 4.6.1 Jan 25, 2018
@WardF WardF modified the milestones: 4.6.1, 4.7.0 Mar 20, 2018
@ocefpaf
Copy link
Author

ocefpaf commented Apr 17, 2018

This PR is stale and I do not have the bandwidth to keep updating it.

I guess that Windows will always be a second class citizen in most projects :-(

@ocefpaf ocefpaf closed this Apr 17, 2018
@ocefpaf ocefpaf deleted the appveyor branch April 17, 2018 11:35
WardF added a commit that referenced this pull request Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants