-
Notifications
You must be signed in to change notification settings - Fork 35
140 lines (105 loc) · 4.17 KB
/
build-linux-debug.yml
File metadata and controls
140 lines (105 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
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/manylinux-build-box-sw67
steps:
- 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: Check space3
run: df -h
- name: Conda Installs
shell: bash -l {0}
run: .github/workflows/gha_conda.sh
- name: Restore Dependencies Cache
id: cache-deps-restore
uses: actions/cache/restore@v3
with:
path: /github/home/install
key: ${{ runner.os }}-deps-debug-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }}
- name: Check space3.5
run: df -h
- name: Clean before deps build
if: steps.cache-deps-restore.outputs.cache-hit != 'true'
run: |
# Clean package manager caches
if command -v apt-get >/dev/null; then
apt-get clean
rm -rf /var/lib/apt/lists/*
fi
# Clean conda
conda clean -all -y
# Remove common temporary locations
rm -rf /tmp/* /var/tmp/*
# Clean pip cache if it exists
if command -v pip >/dev/null; then
pip cache purge
fi
# Show what's using space
echo "=== Disk usage by directory ==="
du -sh /* 2>/dev/null | sort -hr | head -15
- name: Check space4
run: df -h
- name: Build Dependencies
shell: bash -l {0}
run: .github/workflows/gha_deps.sh
- name: Save Dependencies Cache
if: steps.cache-deps-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: /github/home/install
key: ${{ runner.os }}-deps-debug-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.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.4 -DVTK_DIR=$HOME/install/lib/cmake/vtk-9.5 -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