Skip to content
Open
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
12 changes: 12 additions & 0 deletions .circleci/conda/devel-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: base
channels:
- conda-forge
- nodefaults
dependencies:
- cmake
- gxx_linux-64
- gmock
- gtest
- ninja
- pybind11
- pytest
19 changes: 19 additions & 0 deletions .circleci/conda/runtime-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: base
channels:
- conda-forge
- nodefaults
dependencies:
- eigen
- fftw
- gdal
- h5py
- hdf5
- libstdcxx-ng
- numpy
- pyre
- python
- ruamel.yaml
- scipy
- shapely
- sysroot_linux-64=2.17
- yamale
62 changes: 62 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
version: 2.1

jobs:
build-and-test:
docker:
- image: nvidia/cuda:11.4.2-devel-centos7
environment: ISCE3_PREFIX=/opt/isce3
steps:
- run:
name: Install prerequisites
command: |
yum install -y git
- checkout
- run:
name: Install package manager
working_directory: /tmp
command: |
curl -fsSLo Mambaforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh
chmod +x Mambaforge.sh
./Mambaforge.sh -b
$HOME/mambaforge/bin/mamba init
echo "source $HOME/.bashrc" >> $BASH_ENV
- run:
name: Install dependencies
working_directory: .circleci/conda
command: |
mamba env update -f runtime-environment.yml
mamba env update -f devel-environment.yml
- run:
name: Configure
command: |
cmake \
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
-DCMAKE_INSTALL_PREFIX=$ISCE3_PREFIX \
-DWITH_CUDA=ON \
-DCMAKE_CUDA_HOST_COMPILER=$CXX \
-G Ninja \
-B build \
-S .
- run:
name: Build
working_directory: build
command: |
cmake --build .
- run:
name: Install
working_directory: build
command: |
cmake --build . --target=install
echo "export PATH=$ISCE3_PREFIX/bin:$PATH" >> $BASH_ENV
echo "export PYTHONPATH=$ISCE3_PREFIX/packages:$PYTHONPATH" >> $BASH_ENV
echo "export LD_LIBRARY_PATH=$ISCE3_PREFIX/lib:$LD_LIBRARY_PATH" >> $BASH_ENV
- run:
name: Test
working_directory: build
command: |
ctest -E 'stage_dem' -j $(nproc) --output-on-failure

workflows:
pr-checks:
jobs:
- build-and-test
31 changes: 31 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ci:
autofix_prs: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-case-conflict
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v13.0.0
hooks:
- id: clang-format

- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black

- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
args: [--convention=numpy]

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort