Browse Source

Added basic circleci config.yml

lon0
Kevin Hallock 7 years ago
parent
commit
fa01d01a28
  1. 67
      .circleci/config.yml

67
.circleci/config.yml

@ -0,0 +1,67 @@ @@ -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
Loading…
Cancel
Save