ISCE_INSAR/.circleci/config.yml

292 lines
8.9 KiB
YAML
Raw Normal View History

version: 2.1
2019-04-05 16:56:02 +00:00
jobs:
2020-05-02 19:31:15 +00:00
test-cmake:
docker:
- image: hysds/pge-base:latest
user: root
steps:
- checkout:
path: /root/project/src
- run:
name: Install development tools
command: |
set -ex
pwd
yum update -y
yum groupinstall -y "development tools"
- run:
name: Install ISCE requirements
command: |
set -ex
pwd
mkdir config build install
. /opt/conda/bin/activate root
conda install -y cython gdal h5py libgdal pytest numpy fftw scipy scons hdf4 hdf5 libgcc libstdcxx-ng cmake astropy
yum install -y x11-devel motif-devel jq gcc-gfortran opencv opencv-devel opencv-python
2020-05-02 19:31:15 +00:00
- run:
name: Build and Install ISCE
command: |
set -ex
cd /root/project/src
. /opt/conda/bin/activate root
mkdir build
cd build
2020-05-02 21:45:18 +00:00
INSTALLPATH=/opt/conda
MODPATH=$(python3 -c "import site; print(site.getsitepackages()[0])")
# convert to relative path
MODPATH=$(realpath --relative-to=$INSTALLPATH $MODPATH)
cmake .. -DCMAKE_INSTALL_PREFIX=$INSTALLPATH -DPYTHON_MODULE_DIR=$MODPATH
2020-05-02 20:57:41 +00:00
make install VERBOSE=y
2020-05-02 19:31:15 +00:00
- run:
name: Test ISCE installation
command: |
set -ex
2020-05-02 20:26:51 +00:00
cd /root/project/src/build
. /opt/conda/bin/activate root
2020-05-02 20:33:36 +00:00
ctest
2020-05-02 21:08:01 +00:00
ISCE2DIR=$(python3 -c "import os, isce2; print(os.path.dirname(isce2.__file__))" | tail -n 1)
export PATH=$ISCE2DIR/applications:$PATH
2020-05-02 19:31:15 +00:00
topsApp.py --help --steps
stripmapApp.py --help --steps
python3 -c "import isce"
test:
2019-04-05 16:56:02 +00:00
docker:
- image: hysds/pge-base:latest
user: root
steps:
2019-04-06 05:09:50 +00:00
- checkout:
path: /root/project/src
2019-04-05 16:56:02 +00:00
- run:
name: Install development tools
command: |
set -ex
2019-04-06 05:09:50 +00:00
pwd
2019-04-05 16:56:02 +00:00
yum update -y
yum groupinstall -y "development tools"
- run:
name: Install ISCE requirements
command: |
set -ex
2019-04-06 05:09:50 +00:00
pwd
2019-04-17 19:09:03 +00:00
mkdir config build install
2019-04-05 16:56:02 +00:00
. /opt/conda/bin/activate root
conda install --yes cython gdal h5py libgdal pytest numpy fftw scipy scons hdf4 hdf5 libgcc libstdcxx-ng cmake astropy
yum install -y uuid-devel x11-devel motif-devel jq gcc-gfortran opencv opencv-devel opencv-python
2019-04-05 16:56:02 +00:00
ln -s /opt/conda/bin/cython /opt/conda/bin/cython3
cd /opt/conda/lib
unlink libuuid.so
unlink libuuid.so.1
ln -s /lib64/libuuid.so.1.3.0 libuuid.so
ln -s /lib64/libuuid.so.1.3.0 libuuid.so.1
cd /lib64
test -f libgfortran.so || ln -sv libgfortran.so.*.* libgfortran.so
2019-04-06 05:09:50 +00:00
- run:
name: Build SConfigISCE and setup dirs
command: |
set -ex
pwd
cd config
echo "PRJ_SCONS_BUILD = /root/project/build" > SConfigISCE
echo "PRJ_SCONS_INSTALL = /root/project/install/isce" >> SConfigISCE
echo "LIBPATH = /usr/lib64 /usr/lib /opt/conda/lib" >> SConfigISCE
echo "CPPPATH = /opt/conda/include/python3.8 /opt/conda/lib/python3.8/site-packages/numpy/core/include /opt/conda/include /usr/include" >> SConfigISCE
2019-04-06 05:09:50 +00:00
echo "FORTRANPATH = /usr/include /opt/conda/include" >> SConfigISCE
echo "FORTRAN = /bin/gfortran" >> SConfigISCE
echo "CC = /bin/gcc" >> SConfigISCE
echo "CXX = /bin/g++" >> SConfigISCE
echo "MOTIFLIBPATH = /usr/lib64" >> SConfigISCE
echo "X11LIBPATH = /usr/lib64" >> SConfigISCE
echo "MOTIFINCPATH = /usr/include" >> SConfigISCE
echo "X11INCPATH = /usr/include" >> SConfigISCE
echo "RPATH = /opt/conda/lib /usr/lib64 /usr/lib" >> SConfigISCE
cat SConfigISCE
- run:
name: Build and Install ISCE
command: |
set -ex
pwd
. /opt/conda/bin/activate root
cd src
export PATH="/opt/conda/bin:$PATH"
export LD_LIBRARY_PATH="/opt/conda/lib:$LD_LIBRARY_PATH"
SCONS_CONFIG_DIR=/root/project/config scons install --skipcheck
- run:
name: Test ISCE installation
command: |
set -ex
pwd
. /opt/conda/bin/activate root
ISCE_HOME=/root/project/install/isce
2019-04-06 05:09:50 +00:00
export PATH="$ISCE_HOME/bin:$ISCE_HOME/applications:/opt/conda/bin:$PATH"
export PYTHONPATH="/root/project/install:$PYTHONPATH"
export LD_LIBRARY_PATH="/opt/conda/lib:$LD_LIBRARY_PATH"
topsApp.py --help --steps
stripmapApp.py --help --steps
python3 -c "import isce"
build:
docker:
- image: docker:stable-git
steps:
- checkout
- setup_remote_docker
- run:
name: Install dependencies
command: |
apk add --no-cache \
python3-dev py3-pip bash pigz build-base libffi-dev openssl-dev
pip install \
docker-compose awscli
- run:
2019-05-10 14:30:22 +00:00
name: Build docker image
command: |
mkdir images
2019-05-09 18:53:07 +00:00
SHA1=$(echo $CIRCLE_SHA1 | cut -c1-7)
2019-05-09 20:09:28 +00:00
echo "export TAG=$SHA1" >> images/env.sh
source images/env.sh
docker build --rm --force-rm -t isce/isce2:$TAG -f docker/Dockerfile .
cd images
docker save isce/isce2:$TAG > isce2.tar
- persist_to_workspace:
root: images
paths:
- "*"
build-release:
docker:
- image: docker:stable-git
steps:
- checkout
- setup_remote_docker
- run:
name: Install dependencies
command: |
apk add --no-cache \
python3-dev py3-pip bash pigz build-base libffi-dev openssl-dev
pip install \
docker-compose awscli
- run:
name: Build docker image
command: |
mkdir images
echo "export TAG=$CIRCLE_TAG" >> images/env.sh
source images/env.sh
docker build --rm --force-rm -t isce/isce2:$TAG -f docker/Dockerfile .
cd images
docker save isce/isce2:$TAG > isce2.tar
- persist_to_workspace:
root: images
paths:
- "*"
build-periodically:
docker:
- image: docker:stable-git
steps:
- checkout
- setup_remote_docker
- run:
name: Install dependencies
command: |
apk add --no-cache \
python3-dev py3-pip bash pigz build-base libffi-dev openssl-dev
pip install \
docker-compose awscli
- run:
2019-05-10 14:30:22 +00:00
name: Build docker image
command: |
mkdir images
echo 'export TAG=$(date -u +%Y%m%d)' >> images/env.sh
source images/env.sh
docker build --rm --force-rm -t isce/isce2:$TAG -f docker/Dockerfile .
cd images
docker save isce/isce2:$TAG > isce2.tar
- persist_to_workspace:
root: images
paths:
- "*"
deploy:
docker:
2019-05-09 18:20:49 +00:00
- image: docker:stable-git
steps:
2019-05-09 18:56:07 +00:00
- setup_remote_docker
- run:
name: Install dependencies
command: |
apk add --no-cache \
curl file
- attach_workspace:
at: images
- run:
name: Deploy
command: |
cd images
source env.sh
docker load -i isce2.tar
docker tag isce/isce2:$TAG isce/isce2:latest
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push isce/isce2:$TAG
docker push isce/isce2:latest
2019-04-05 16:56:02 +00:00
workflows:
version: 2
test:
jobs:
- test
2020-05-02 19:31:15 +00:00
- test-cmake
various updates from ARIA-related projects (#149) * add Dockerfile and SConfigISCE to build cuda-enabled modules * add Dockerfile and SConfigISCE to build cuda-enabled modules * set correct name * update for centos7 and cuda-dev image * restore * disable GPUampcor * update * save * sync up Dockerfile updates * fix base image * change docker image names * create gpu vs. cpu specific tags * update with nodata WBD Stitcher * fix segmentation fault when running sciflo workflows - remove dependencies that downgrade the `geos` conda package * sync fix for segmentation fault to cuda builds * ping ffi to version 1.12.2 Latest version of ffi, 1.13.0, breaks installation of fpm: ``` $ sudo gem install --no-ri --no-rdoc fpm Fetching: cabin-0.9.0.gem (100%) Successfully installed cabin-0.9.0 Fetching: backports-3.17.2.gem (100%) Successfully installed backports-3.17.2 Fetching: arr-pm-0.0.10.gem (100%) Successfully installed arr-pm-0.0.10 Fetching: clamp-1.0.1.gem (100%) Successfully installed clamp-1.0.1 Fetching: ffi-1.13.0.gem (100%) ERROR: Error installing fpm: ffi requires Ruby version >= 2.3. ``` TODO: remove pin when ffi's backwards compatiblity is restored. * comment out unused import * add build circleci job to PR tests * pin ffi in cuda build * revert logging hackery * fix "target_include_directories called with non-compilable target type" errors * Keep source directory for topsStack Co-authored-by: dustinlo <dustin.k.lo@jpl.nasa.gov> Co-authored-by: shitong01 <stchin@ntu.edu.sg> Co-authored-by: Ryan Burns <47790121+rtburns-jpl@users.noreply.github.com>
2020-07-16 23:08:57 +00:00
- build
build-deploy:
jobs:
- build:
filters:
branches:
only: main
- deploy:
requires:
- build
filters:
branches:
only: main
build-deploy-release:
jobs:
- build-release:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- deploy:
requires:
2019-07-22 15:53:18 +00:00
- build-release
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
weekly:
triggers:
- schedule:
cron: "0 7 * * 0"
filters:
branches:
only:
- main
jobs:
- build-periodically:
filters:
branches:
only: main
- deploy:
requires:
- build-periodically
filters:
branches:
only: main