Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH action for CI/CD #5300

Closed
wants to merge 16 commits into from
Closed
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
pull_request:
branches:
- dev
push:
branches:
- dev

jobs:
Build-and-Test-LinuxOsx:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
submodules: true
ref: dev
- uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
with:
miniconda-version: "latest"
activate-environment: isis
environment-file: environment.yml
auto-activate-base: false
auto-update-conda: true
- name: Check build environment
run: |
conda list
conda env export
- name: Download ISIS data
run: |
mkdir isis_data
mkdir isis_testData
which rclone
rclone mount asc_s3://asc-isisdata/usgs_data isis_data --config=${GITHUB_WORKSPACE}/isis/config/rclone.conf --daemon
rclone mount asc_s3://asc-isisdata/isis_testData isis_testData --config=${GITHUB_WORKSPACE}/isis/config/rclone.conf --daemon
- name: Build ISIS
run: |
mkdir -p build
cp ${GITHUB_WORKSPACE}/isis/IsisPreferences ${GITHUB_WORKSPACE}/build/
export ISISDATA=${GITHUB_WORKSPACE}/isis_data
export ISISTESTDATA=${GITHUB_WORKSPACE}/isis_testData
export ISISROOT=${GITHUB_WORKSPACE}/build/
export PATH=$PATH:${GITHUB_WORKSPACE}/build/bin/
cd build
cmake -DisisData=${GITHUB_WORKSPACE}/isis_data -DisisTestData=${GITHUB_WORKSPACE}/isis_testData -DSWIG_DIR=$CONDA_PREFIX/bin/swig -DJP2KFLAG=OFF -DCMAKE_BUILD_TYPE=RELEASE -Wdeprecated -GNinja ../isis
ninja
- name: Run ISIS tests
run: |
cd build
export ISISDATA=${GITHUB_WORKSPACE}/isis_data
export ISISTESTDATA=${GITHUB_WORKSPACE}/isis_testData
export ISISROOT=${GITHUB_WORKSPACE}/build/
export PATH=$PATH:${GITHUB_WORKSPACE}/build/bin/
ctest -VV

Loading