From fa01d01a2897bca083990ddf360d5109d173eef8 Mon Sep 17 00:00:00 2001 From: Kevin Hallock Date: Wed, 28 Nov 2018 14:04:32 -0700 Subject: [PATCH] Added basic circleci config.yml --- .circleci/config.yml | 67 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..99c433d --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,67 @@ +# Python CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-python/ for more details +# +version: 2 +jobs: + build: + docker: + # specify the version you desire here + # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` + - image: circleci/python:3.6.1 + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/postgres:9.4 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: install conda + command: | + echo "Installing a fresh version of Miniconda." + MINICONDA_URL="https://repo.continuum.io/miniconda" + MINICONDA_FILE="Miniconda3-latest-Linux-x86_64.sh" + curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}" + bash $MINICONDA_FILE -b + + - run: + name: install dependencies + command: | + source ~/miniconda3/bin/activate root + conda create -n wrf-python -c conda-forge gcc setuptools python numpy wrapt xarray netcdf4 + + - run: + name: build wrf-python + command: | + source ~/miniconda3/bin/activate wrf-python + cd fortran/build_help + gfortran -o sizes -fopenmp omp_sizes.f90 + LD_LIBRARY_PATH=~/miniconda3/envs/wrf-python/lib python sub_sizes.py + cd .. + gfortran -E ompgen.F90 -fopenmp -cpp -o omp.f90 + f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature + cd .. + python setup.py config_fc --f90flags="-mtune=generic -fopenmp" build_ext --libraries="gomp" build + python setup.py install --single-version-externally-managed --record=record.txt + + + # run tests! + # this example uses Django's built-in test-runner + # other common Python testing frameworks include pytest and nose + # https://pytest.org + # https://nose.readthedocs.io + - run: + name: run tests + command: | + source ~/miniconda3/bin/activate wrf-python + cd test/ci_tests + python utests.py + + - store_artifacts: + path: test-reports + destination: test-reports