ISCE_INSAR/.circleci/config.yml

258 lines
7.9 KiB
YAML
Raw Permalink 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: ubuntu:20.04
2020-05-02 19:31:15 +00:00
steps:
- checkout:
path: /root/project/src
- run:
name: Install ISCE requirements
command: |
set -ex
pwd
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y cmake cython3 git libfftw3-dev libgdal-dev libhdf4-alt-dev libhdf5-dev libopencv-dev python3-gdal python3-h5py python3-numpy python3-scipy
2020-05-02 19:31:15 +00:00
- run:
name: Build and Install ISCE
command: |
set -ex
cd /root/project/src
mkdir build
cd build
MODPATH=$(python3 -c "import site; print(site.getsitepackages()[-1])")
cmake .. -DCMAKE_INSTALL_PREFIX=install -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
ctest --output-on-failure
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"
# Create dummy ref/secondary configs for topsApp
ln -s ../examples/input_files/reference_TOPS_SENTINEL1.xml reference.xml
ln -s reference.xml secondary.xml
topsApp.py --steps --end=preprocess ../examples/input_files/topsApp.xml
2020-05-02 19:31:15 +00:00
test:
2019-04-05 16:56:02 +00:00
docker:
- image: ubuntu:20.04
2019-04-05 16:56:02 +00:00
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 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
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y scons cython3 git libfftw3-dev libgdal-dev libhdf4-alt-dev libhdf5-dev libmotif-dev libopencv-dev libx11-dev python3-gdal python3-h5py python3-numpy python3-scipy
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 /usr/lib/x86_64-linux-gnu" >> SConfigISCE
python_inc="/usr/include/python3.8 /usr/lib/python3/dist-packages/numpy/core/include"
echo "CPPPATH = $python_inc /usr/include /usr/include/gdal /usr/include/opencv4" >> SConfigISCE
echo "FORTRANPATH = /usr/include" >> SConfigISCE
2019-04-06 05:09:50 +00:00
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 = /usr/lib64 /usr/lib" >> SConfigISCE
2019-04-06 05:09:50 +00:00
cat SConfigISCE
- run:
name: Build and Install ISCE
command: |
set -ex
pwd
cd src
SCONS_CONFIG_DIR=/root/project/config scons install --skipcheck
- run:
name: Test ISCE installation
command: |
set -ex
pwd
ISCE_HOME=/root/project/install/isce
export PATH="$ISCE_HOME/bin:$ISCE_HOME/applications:$PATH"
2019-04-06 05:09:50 +00:00
export PYTHONPATH="/root/project/install:$PYTHONPATH"
topsApp.py --help --steps
stripmapApp.py --help --steps
python3 -c "import isce"
2021-03-05 18:36:38 +00:00
python3 -c "import isce; from isceobj.Sensor import SENSORS as s; [s[k]() for k in s]"
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 \
docker-compose aws-cli
- 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 \
docker-compose aws-cli
- 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 \
docker-compose aws-cli
- 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