CDAT / cdms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use dockerfile to speed circleci

doutriaux1 opened this issue · comments

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@doutriaux1 ?? what is this for??

Originally to speed up the build. Start from a container with miniconda on it and sample data. But actually if you look at vcs, using a cache is better.

clang does not find "stdio.h" for macosx. This is in conda_upload.sh so you cannot upload osx to conda-forge.

I tried different solution without success.

https://github.com/conda-forge/gdal-feedstock/blob/master/.ci_support/osx_.yaml

$PREFIX/include/python3.6m/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^~~~~~~~~
1 error generated.
Traceback (most recent call last):
  File "/Users/distiller/miniconda/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/Users/distiller/miniconda/lib/python3.7/site-packages/conda_build/cli/main_build.py", line 445, in main
    execute(sys.argv[1:])
  File "/Users/distiller/miniconda/lib/python3.7/site-packages/conda_build/cli/main_build.py", line 436, in execute
    verify=args.verify, variants=args.variants)
  File "/Users/distiller/miniconda/lib/python3.7/site-packages/conda_build/api.py", line 209, in build
    notest=notest, need_source_download=need_source_download, variants=variants)
  File "/Users/distiller/miniconda/lib/python3.7/site-packages/conda_build/build.py", line 2313, in build_tree
    notest=notest,
  File "/Users/distiller/miniconda/lib/python3.7/site-packages/conda_build/build.py", line 1461, in build
    cwd=src_dir, stats=build_stats)
  File "/Users/distiller/miniconda/lib/python3.7/site-packages/conda_build/utils.py", line 397, in check_call_env
    return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs)
  File "/Users/distiller/miniconda/lib/python3.7/site-packages/conda_build/utils.py", line 377, in _func_defaulting_env_to_os_environ
    raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-e', '/Users/distiller/conda-bld/cdms2_1561764428595/work/conda_build.sh']' returned non-zero exit status 1.
usage: anaconda upload [-h] [-c CHANNELS] [-l LABELS] [--no-progress]
                       [-u USER] [--all] [-p PACKAGE] [-v VERSION]
                       [-s SUMMARY] [-t PACKAGE_TYPE] [-d DESCRIPTION]
                       [--thumbnail THUMBNAIL] [--private]
                       [--no-register | --register] [--build-id BUILD_ID]
                       [-i | -f | --force | --skip-existing]
                       files [files ...]
anaconda upload: error: the following arguments are required: files

So I got OSX to compile on circleci with clang. I had to add openblas to circle.yml packages. Somehow libcf needs it and it was not in the run dependencies. I though we recompiled libcf with libcblas and libblas

Here are the changes.
Note the setup.py changes only for circleci. conda build will fail on a regular due to build.sh

https://github.com/CDAT/cdms/pull/348/files

Closing this as we'll be revamping the build process.