Skip to content
Merged
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
1 change: 0 additions & 1 deletion .github/workflows/build-linux-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ 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 }}
CCACHE_DIR: /github/home/.ccache
CCACHE_MAXSIZE: "500M"
CCACHE_COMPRESS: "true"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
SW_CLOUD_LOGIN: ${{ secrets.CLOUD_LOGIN }}
CACHE_HOST: ${{ secrets.SSH_HOST }}
GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }}
GA_API_SECRET: ${{ secrets.GA_API_SECRET }}
CCACHE_DIR: /github/home/.ccache
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-mac-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ env:
BUILD_TYPE: Release
MACOSX_DEPLOYMENT_TARGET: "14.0"
SW_CLOUD_LOGIN: ${{ secrets.CLOUD_LOGIN }}
CACHE_HOST: ${{ secrets.SSH_HOST }}
GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }}
GA_API_SECRET: ${{ secrets.GA_API_SECRET }}
CCACHE_DIR: /Users/runner/.ccache
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ env:
BUILD_TYPE: Release
MACOSX_DEPLOYMENT_TARGET: "14.0"
SW_CLOUD_LOGIN: ${{ secrets.CLOUD_LOGIN }}
CACHE_HOST: ${{ secrets.SSH_HOST }}
GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }}
GA_API_SECRET: ${{ secrets.GA_API_SECRET }}
CCACHE_DIR: /Users/runner/.ccache
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
SW_CLOUD_LOGIN: ${{ secrets.CLOUD_LOGIN }}
CACHE_HOST: ${{ secrets.SSH_HOST }}
GA_MEASUREMENT_ID: ${{ secrets.GA_MEASUREMENT_ID }}
GA_API_SECRET: ${{ secrets.GA_API_SECRET }}

Expand Down Expand Up @@ -83,7 +82,7 @@ jobs:
- name: Get NSIS
working-directory: ${{runner.workspace}}
run: |
curl -o nsis.zip https://www.sci.utah.edu/~amorris/NSISPortable_3.04.zip
curl -fL -o nsis.zip https://github.com/SCIInstitute/ShapeWorks/releases/download/ci-assets/NSISPortable_3.04.zip
Expand-Archive -LiteralPath nsis.zip -DestinationPath .

- name: Conda Installs
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
PATH="$(brew --prefix)/opt/coreutils/libexec/gnubin:$PATH"
fi

# absolute path to this script
SCRIPT=$(readlink -f $0)
# absolute path this script is located
SCRIPT_PATH=`dirname $SCRIPT`


if [[ "$OSTYPE" == "darwin"* ]]; then
source ~/.zshrc
Expand All @@ -23,7 +18,6 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
CCACHE_DIR="/Users/runner/Library/Caches/ccache"
USE_CCACHE="ON"
PATH="$(brew --prefix)/opt/gnu-tar/libexec/gnubin:$PATH"
SUFFIX="tar.gz"
elif [[ "$OSTYPE" == "linux"* ]]; then
if [ -f ~/.bashrc ] ; then
source ~/.bashrc
Expand All @@ -33,53 +27,15 @@ elif [[ "$OSTYPE" == "linux"* ]]; then
DEP_PATH="$HOME/install"
CCACHE_DIR="$HOME/.ccache"
USE_CCACHE="ON"
SUFFIX="tar.gz"
else
source /c/Users/runneradmin/.bash_profile
PLATFORM="windows"
CONDA_PATH="C:\Miniconda\envs\shapeworks"
DEP_PATH="C:\deps"
USE_CCACHE="OFF"
SUFFIX="7z"
fi

compress_file() {
if [[ "$PLATFORM" == "windows" ]]; then
7z -spf a "$1" "$2"
else
df -h
which tar
tar --use-compress-program=pigz -cf "$1" "$2"
fi
}

decompress_file() {
if [[ "$PLATFORM" == "windows" ]]; then
if 7z t "$1" ; then
7z -spf x "$1"
fi
else
df -h
which tar
if tar -tzf "$1" >/dev/null ; then
tar --use-compress-program=pigz -xf "$1"
fi
fi
}


if [[ "$USE_CCACHE" == "ON" ]]; then
mkdir -p $CCACHE_DIR
echo "compression = true" > $CCACHE_DIR/ccache.conf
fi

CONDA_HASH=`cat $SCRIPT_PATH/../../install_shapeworks.sh $SCRIPT_PATH/../../python_requirements.txt | sha1sum | awk '{ print $1 }'`
echo "CONDA_HASH = ${CONDA_HASH}"
CONDA_FILE="conda-${PLATFORM}-${CONDA_HASH}.${SUFFIX}"

DEP_HASH=`sha1sum $SCRIPT_PATH/../../build_dependencies.sh | awk '{ print $1 }'`
DEP_HASH="${CONDA_HASH}_${DEP_HASH}"
echo "DEP_HASH = ${DEP_HASH}"
DEP_FILE="dep-${PLATFORM}-${DEP_HASH}-${BUILD_TYPE}.${SUFFIX}"

CCACHE_FILE="${PLATFORM}-ccache.${SUFFIX}"
37 changes: 0 additions & 37 deletions .github/workflows/copy_artifact.sh

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
env:
BUILD_TYPE: Debug
SW_CLOUD_LOGIN: ${{ secrets.CLOUD_LOGIN }}
CACHE_HOST: ${{ secrets.SSH_HOST }}
CCACHE_DIR: /github/home/.ccache
CCACHE_MAXSIZE: "500M"
CCACHE_COMPRESS: "true"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/download_test_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ for run in {1..5}; do
if tar -tzf /tmp/tiny_test_cache.tar.gz > /dev/null 2>&1 ; then
break
fi
wget --continue --tries=3 --timeout=60 https://www.sci.utah.edu/~shapeworks/doc-resources/zips/tiny_test_cache.tar.gz || true
wget --continue --tries=3 --timeout=60 https://github.com/SCIInstitute/ShapeWorks/releases/download/ci-assets/tiny_test_cache.tar.gz || true
sleep 1
done

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/gha_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ else
conda activate shapeworks
export INSTALL_DIR="$DEP_PATH"
export BUILD_DIR=$HOME/build
export FILE="/tmp/${DEP_FILE}"
if [[ "$PLATFORM" == "windows" ]]; then
export INSTALL_DIR="C:\deps"
export BUILD_DIR="/c/bdeps"
export FILE="${DEP_FILE}"
fi

NPROCS=4
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/restore_caches.sh

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/store_ccache.sh

This file was deleted.

82 changes: 49 additions & 33 deletions build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,37 @@ at_least_required_version()
fi
}

# clone_repo <dir> <git clone args...>
# Clones into <dir> (relative to the current directory) and cd's into it.
# An existing clone is reused. Network failures are retried, and the script
# exits if the clone still fails so the real error isn't buried.
clone_repo()
{
local dir=$1
shift
if [[ ! -d "${dir}/.git" ]]; then
local attempt
for attempt in 1 2 3; do
rm -rf "${dir}"
git clone "$@" "${dir}" && break
if [[ $attempt == 3 ]]; then
echo "## ERROR: failed to clone ${dir} after ${attempt} attempts"
exit 1
fi
echo "## clone of ${dir} failed (attempt ${attempt}), retrying in 30s..."
sleep 30
done
fi
cd "${dir}" || exit 1
}

build_vtk()
{
echo ""
echo "## Building vtk..."
cd ${BUILD_DIR}
git clone https://gitlab.kitware.com/vtk/vtk.git
cd vtk
git checkout -f tags/${VTK_VER}
cd ${BUILD_DIR} || exit 1
clone_repo vtk https://gitlab.kitware.com/vtk/vtk.git
git checkout -f tags/${VTK_VER} || exit 1
patch -p1 < ${SCRIPT_DIR}/Support/vtk-9.5.patch
if [[ $BUILD_CLEAN = 1 ]]; then rm -rf build; fi
mkdir -p build && cd build
Expand Down Expand Up @@ -180,10 +203,9 @@ build_itk()
{
echo ""
echo "## Building itk..."
cd ${BUILD_DIR}
git clone https://github.com/InsightSoftwareConsortium/ITK.git
cd ITK
git checkout -f tags/${ITK_VER}
cd ${BUILD_DIR} || exit 1
clone_repo ITK https://github.com/InsightSoftwareConsortium/ITK.git
git checkout -f tags/${ITK_VER} || exit 1

# replace <fp.h> with <math.h> in Modules/ThirdParty/PNG/src/itkpng/pngpriv.h
if [ "$(uname)" == "Darwin" ]; then
Expand Down Expand Up @@ -215,12 +237,11 @@ build_xlnt()
{
echo ""
echo "## Building Xlnt..."
cd ${BUILD_DIR}
git clone https://github.com/tfussell/xlnt.git
cd xlnt
git checkout -f ${XLNT_VER}
git submodule init
git submodule update
cd ${BUILD_DIR} || exit 1
clone_repo xlnt https://github.com/tfussell/xlnt.git
git checkout -f ${XLNT_VER} || exit 1
git submodule init || exit 1
git submodule update || exit 1

# move conflicting file out of the way so it builds on osx
mv third-party/libstudxml/version third-party/libstudxml/version.bak
Expand Down Expand Up @@ -254,9 +275,8 @@ build_jkqtplotter()
{
echo ""
echo "## Building JKQTPlotter..."
cd ${BUILD_DIR}
git clone --depth 1 --branch ${JKQTPLOTTER_VER} https://github.com/akenmorris/JKQtPlotter.git jkqtplotter
cd jkqtplotter
cd ${BUILD_DIR} || exit 1
clone_repo jkqtplotter --depth 1 --branch ${JKQTPLOTTER_VER} https://github.com/akenmorris/JKQtPlotter.git
# fix compile on windows
sed -i '1s/^/#include <stdexcept>\n/' lib/jkqtcommon/jkqtpdebuggingtools.h

Expand All @@ -281,10 +301,9 @@ build_openvdb()
{
echo ""
echo "## Building OpenVDB..."
cd ${BUILD_DIR}
git clone https://github.com/AcademySoftwareFoundation/openvdb.git
cd openvdb
git checkout ${OpenVDB_VER}
cd ${BUILD_DIR} || exit 1
clone_repo openvdb https://github.com/AcademySoftwareFoundation/openvdb.git
git checkout ${OpenVDB_VER} || exit 1

# patch for Clang 17
patch -p1 < ${SCRIPT_DIR}/Support/openvdb-9.1.0.patch
Expand Down Expand Up @@ -314,10 +333,9 @@ build_igl()
{
echo " "
echo "## Building Libigl..."
cd ${INSTALL_DIR}
git clone https://github.com/libigl/libigl.git
cd libigl
git checkout -f tags/${libigl_VER}
cd ${INSTALL_DIR} || exit 1
clone_repo libigl https://github.com/libigl/libigl.git
git checkout -f tags/${libigl_VER} || exit 1

LIBIGL_DIR=${INSTALL_DIR}/libigl/cmake
}
Expand All @@ -326,10 +344,9 @@ build_geometry_central()
{
echo " "
echo "## Building Geometry central..."
cd ${BUILD_DIR}
git clone --recursive https://github.com/nmwsharp/geometry-central.git
cd geometry-central
git checkout -f ${geometry_central_VER}
cd ${BUILD_DIR} || exit 1
clone_repo geometry-central --recursive https://github.com/nmwsharp/geometry-central.git
git checkout -f ${geometry_central_VER} || exit 1
mkdir build

if [[ $BUILD_CLEAN = 1 ]]; then rm -rf build; fi
Expand Down Expand Up @@ -359,11 +376,10 @@ build_acvd()
{
echo ""
echo "## Building ACVD..."
cd ${BUILD_DIR}
cd ${BUILD_DIR} || exit 1
#git clone https://github.com/valette/ACVD.git acvd
git clone https://github.com/akenmorris/ACVD.git acvd
cd acvd
git checkout -f ${ACVD_VER}
clone_repo acvd https://github.com/akenmorris/ACVD.git
git checkout -f ${ACVD_VER} || exit 1

# silence a bunch of output
sed -i'.original' -e 's/cout/if(0)cout/' Common/vtkCurvatureMeasure.cxx
Expand Down
Loading