diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..d140d72eaf --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 +