# Python CircleCI 2.0 configuration file # # Check https://circleci.com/docs/2.0/language-python/ for more details # version: 2 jobs: pep8: docker: - image: circleci/python:3.6.1 working_directory: ~/repo steps: - checkout - run: name: run pycodestyle command: | pip install pycodestyle pycodestyle src test 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 # Download and cache dependencies - restore_cache: keys: - v1-dependencies-{{ checksum ".circleci/conda_env.yml" }} - run: name: install conda and dependencies command: | test -d ~/miniconda3 && exit 0 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 source ~/miniconda3/bin/activate root conda env create -f .circleci/conda_env.yml - save_cache: paths: - ~/miniconda3 key: v1-dependencies-{{ checksum ".circleci/conda_env.yml" }} - run: name: build wrf-python command: | source ~/miniconda3/bin/activate wrf-python unset FFLAGS unset LDFLAGS unset CFLAGS cd fortran/build_help $FC -o sizes -fopenmp omp_sizes.f90 LD_LIBRARY_PATH=~/miniconda3/envs/wrf-python/lib python sub_sizes.py cd .. $FC -E ompgen.F90 -fopenmp -cpp -o omp.f90 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