Skip to content

Commit

Permalink
Save disk space during build by cleaning up work directories
Browse files Browse the repository at this point in the history
  • Loading branch information
oseiskar committed May 3, 2021
1 parent a26ef71 commit e6f25b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
apt-get clean
- name: Build for Linux
run: |
DO_CLEAR=OFF BUILD_VISUALIZATIONS=OFF ./scripts/build.sh
DO_CLEAR=OFF BUILD_VISUALIZATIONS=OFF POST_CLEAR=ON ./scripts/build.sh
- name: Build for Android
run: |
BUILD_VISUALIZATIONS=OFF BUILD_EIGEN=OFF ./scripts/android/build.sh
BUILD_VISUALIZATIONS=OFF BUILD_EIGEN=OFF POST_CLEAR=ON ./scripts/android/build.sh
- name: Package (Debug)
run: |
./scripts/package.sh
Expand Down
5 changes: 5 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ set -e
: "${WITH_OPENGL:=ON}"
: "${USE_OPENCV_VIDEO_RECORDING:=ON}"
: "${DO_CLEAR:=ON}"
: "${POST_CLEAR:=OFF}"
: "${NPROC:=4}"
# on non-iOS platforms, pass -- -j X to set the number of thread used
# which speeds up the build. There is also a -j flag in newer CMake versions,
Expand Down Expand Up @@ -102,3 +103,7 @@ fi
if [ -d "$BUILD_DIR/lib64" ]; then
cp -rf $BUILD_DIR/lib64/* $BUILD_DIR/lib/
fi

if [[ $POST_CLEAR == "ON" ]]; then
rm -rf "$WORK_DIR"
fi

0 comments on commit e6f25b2

Please sign in to comment.