Merge pull request #2225 from SCIInstitute/2224-light-the-torch #1194
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux Build Debug | |
on: | |
push: | |
branches: | |
- master | |
- release_v* | |
tags: | |
- '*' | |
pull_request: | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Debug | |
SW_CLOUD_LOGIN: ${{ secrets.CLOUD_LOGIN }} | |
CACHE_HOST: ${{ secrets.SSH_HOST }} | |
# LD_LIBRARY_PATH: /opt/conda/envs/shapeworks/lib | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: akenmorris/ubuntu-build-box-focal-sw65 | |
steps: | |
- name: Install SSH Key | |
uses: shimataro/ssh-key-action@v2.7.0 | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
- name: Conda info | |
run: conda info | |
- name: Check space1 | |
run: df -h | |
- name: Free some space | |
run: cd /__t ; rm -rf CodeQL go PyPy Python Ruby | |
- name: Check usage | |
run: cd /__t ; du -sh * | |
- name: Check space2 | |
run: df -h | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Workaround for permission issue | |
run: git config --global --add safe.directory /__w/ShapeWorks/ShapeWorks | |
- name: Get tags | |
run: git fetch --unshallow origin +refs/tags/*:refs/tags/* | |
- name: Restore Caches | |
shell: bash -l {0} | |
run: .github/workflows/restore_caches.sh | |
- name: Check space3 | |
run: df -h | |
- name: Conda Installs | |
shell: bash -l {0} | |
run: .github/workflows/gha_conda.sh | |
- name: Check space4 | |
run: df -h | |
- name: Build Dependencies | |
shell: bash -l {0} | |
run: .github/workflows/gha_deps.sh | |
- name: Check space5 | |
run: df -h | |
- name: cmake | |
shell: bash -l {0} | |
run: conda activate shapeworks && mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS=-g -DITK_DIR=$HOME/install/lib/cmake/ITK-5.2 -DVTK_DIR=$HOME/install/lib/cmake/vtk-9.1 -DXLNT_DIR=$HOME/install -DLIBIGL_DIR=$HOME/install -DOpenVDB_DIR=$HOME/install/lib/cmake/OpenVDB -DGEOMETRYCENTRAL_DIR=$HOME/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBuild_Studio=ON -DJKQTCommonSharedLib_DIR=$HOME/install/lib/cmake/JKQTCommonSharedLib -DJKQTMathTextSharedLib_DIR=$HOME/install/lib/cmake/JKQTMathTextSharedLib -DJKQTPlotterSharedLib_DIR=$HOME/install/lib/cmake/JKQTPlotterSharedLib -DACVD_DIR=$HOME/install -DCMAKE_PREFIX_PATH=${CONDA_PREFIX} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/shapeworks-install -DUSE_ORIGIN_RPATH=ON .. | |
- name: Check space6 | |
run: df -h | |
- name: make | |
shell: bash -l {0} | |
run: conda activate shapeworks && cd build && make -j2 | |
- name: Check space7 | |
run: df -h | |
- name: make install | |
shell: bash -l {0} | |
run: conda activate shapeworks && cd build && make install | |
- name: Download test data | |
shell: bash -l {0} | |
run: .github/workflows/download_test_data.sh | |
- name: make test | |
shell: bash -l {0} | |
run: conda activate shapeworks && source ./devenv.sh ./build/bin && cd build && ctest -VV | |
- name: Store ccache | |
shell: bash -l {0} | |
run: .github/workflows/store_ccache.sh | |