Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 16 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,40 @@ jobs:
docker:
- image: ubuntu:bionic
environment:
CONDA_PREFIX: /root/tools/miniconda3
CONDA_PREFIX: /root/tools/mambaforge
PYSOLID_HOME: /root/tools/PySolid
user: root
working_directory: /root/tools/PySolid
# Checkout the code as the first step. This is a dedicated CircleCI step.
steps:
- checkout
- run:
name: Setting Environment with Miniconda
name: Setting Environment with Mambaforge
command: |
apt update
apt-get update --yes && apt-get upgrade --yes
apt-get install --yes wget git
# download and install miniconda3
# download and install mambaforge
mkdir -p ${HOME}/tools
cd ${HOME}/tools
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p ${HOME}/tools/miniconda3
${HOME}/tools/miniconda3/bin/conda init bash
${HOME}/tools/miniconda3/bin/conda config --add channels conda-forge
${HOME}/tools/miniconda3/bin/conda install -c conda-forge --yes mamba
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
bash Mambaforge-Linux-x86_64.sh -b -p ${HOME}/tools/mambaforge
${HOME}/tools/mambaforge/bin/mamba init bash
# modify/export env var PATH to BASH_ENV to be shared across run steps
echo 'export PATH=${CONDA_PREFIX}/bin:${PATH}' >> ${BASH_ENV}

- run:
name: Installing PySolid
no_output_timeout: 10m
command: |
export PYTHONUNBUFFERED=1
# setup environment variable
export PATH=${CONDA_PREFIX}/bin:${PATH}
# install dependencies
source activate root
mamba install --verbose --yes fortran-compiler --file ${HOME}/tools/PySolid/requirements.txt
python -m pip install ${HOME}/tools/PySolid
# install dependencies and source code
mamba install --verbose --yes fortran-compiler --file ${PYSOLID_HOME}/requirements.txt
python -m pip install ${PYSOLID_HOME}

- run:
name: Test
name: Unit Test
command: |
# setup environment variables
export PATH=${CONDA_PREFIX}/bin:${PATH}
# run tests
python ${HOME}/tools/PySolid/tests/point.py
python ${HOME}/tools/PySolid/tests/grid.py
python ${PYSOLID_HOME}/tests/point.py
python ${PYSOLID_HOME}/tests/grid.py
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![Language](https://img.shields.io/badge/python-3.8%2B-blue.svg?style=flat-square)](https://www.python.org/)
[![CircleCI](https://img.shields.io/circleci/build/github/insarlab/PySolid.svg?logo=circleci&label=test&style=flat-square)](https://circleci.com/gh/insarlab/PySolid)
[![Version](https://img.shields.io/github/v/release/insarlab/PySolid?color=brightgreen&label=version&style=flat-square)](https://github.com/insarlab/PySolid/releases)
[![Conda Download](https://img.shields.io/conda/dn/conda-forge/pysolid?color=green&style=flat-square)](https://anaconda.org/conda-forge/pysolid)
[![License](https://img.shields.io/badge/license-GPLv3+-yellow.svg?style=flat-square)](https://github.com/insarlab/PySolid/blob/main/LICENSE)
[![Citation](https://img.shields.io/badge/doi-10.1109%2FTGRS.2022.3168509-blue?style=flat-square)](https://doi.org/10.1109/TGRS.2022.3168509)
[![CircleCI](https://img.shields.io/circleci/build/github/insarlab/PySolid.svg?logo=circleci&label=tests&style=flat-square)](https://circleci.com/gh/insarlab/PySolid)
[![Conda Download](https://img.shields.io/conda/dn/conda-forge/pysolid?color=green&label=conda%20downloads&style=flat-square)](https://anaconda.org/conda-forge/pysolid)
[![Version](https://img.shields.io/github/v/release/insarlab/PySolid?color=yellow&label=version&style=flat-square)](https://github.com/insarlab/PySolid/releases)
[![License](https://img.shields.io/badge/license-GPLv3+-blue.svg?style=flat-square)](https://github.com/insarlab/PySolid/blob/main/LICENSE)
[![Citation](https://img.shields.io/badge/DOI-10.1109%2FTGRS.2022.3168509-blue?style=flat-square)](https://doi.org/10.1109/TGRS.2022.3168509)

## PySolid

Expand Down