From 3204f0e5b64a9337ab2249464071f3245c542a34 Mon Sep 17 00:00:00 2001 From: Zhang Yunjun Date: Mon, 10 Apr 2023 11:31:55 +0800 Subject: [PATCH] circleci: use mambaforge + circleci: use mambaforge to speedup + use PYAPS_HOME env + README/badge: update style/order to be consistent with mintpy --- .circleci/config.yml | 24 +++++++++++------------- README.md | 8 ++++---- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3eceb54..258a2c0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,26 +25,25 @@ jobs: docker: - image: ubuntu:bionic environment: - CONDA_PREFIX: /root/tools/miniconda3 + CONDA_PREFIX: /root/tools/mambaforge + PYAPS_HOME: /root/tools/PyAPS user: root working_directory: /root/tools/PyAPS # 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 git wget - # 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} @@ -53,13 +52,12 @@ jobs: no_output_timeout: 10m command: | export PYTHONUNBUFFERED=1 - # install dependencies + # install dependencies and source code source activate root - mamba install --verbose --yes --file ${HOME}/tools/PyAPS/requirements.txt - python -m pip install ${HOME}/tools/PyAPS + mamba install --verbose --yes --file ${PYAPS_HOME}/requirements.txt + python -m pip install ${PYAPS_HOME} - run: name: Test the Installation command: | - python ${HOME}/tools/PyAPS/tests/test_calc.py - + python ${PYAPS_HOME}/tests/test_calc.py diff --git a/README.md b/README.md index f649a15..ef747b2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ [![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/PyAPS.svg?logo=circleci&label=test&style=flat-square)](https://circleci.com/gh/insarlab/PyAPS) -[![Version](https://img.shields.io/github/v/release/insarlab/PyAPS?color=brightgreen&label=version&style=flat-square)](https://github.com/insarlab/PyAPS/releases) -[![Conda Download](https://img.shields.io/conda/dn/conda-forge/pyaps3?color=green&style=flat-square)](https://anaconda.org/conda-forge/pyaps3) -[![License](https://img.shields.io/badge/license-GPLv3+-yellow.svg?style=flat-square)](https://github.com/insarlab/PyAPS/blob/main/LICENSE) +[![CircleCI](https://img.shields.io/circleci/build/github/insarlab/PyAPS.svg?logo=circleci&label=tests&style=flat-square)](https://circleci.com/gh/insarlab/PyAPS) +[![Conda Download](https://img.shields.io/conda/dn/conda-forge/pyaps3?color=green&label=conda%20downloads&style=flat-square)](https://anaconda.org/conda-forge/pyaps3) +[![Version](https://img.shields.io/github/v/release/insarlab/PyAPS?color=yellow&label=version&style=flat-square)](https://github.com/insarlab/PyAPS/releases) +[![License](https://img.shields.io/badge/license-GPLv3+-blue.svg?style=flat-square)](https://github.com/insarlab/PyAPS/blob/main/LICENSE) [![Citation](https://img.shields.io/badge/doi-10.1029%2F2011GL048757-blue?style=flat-square)](https://doi.org/10.1029/2011GL048757) ## PyAPS - Python based Atmospheric Phase Screen estimation