diff --git a/gitlab/after_build.sh b/gitlab/after_build.sh new file mode 100755 index 0000000000000000000000000000000000000000..a568abe8eac65890980ea638d89e78c16e972159 --- /dev/null +++ b/gitlab/after_build.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +source $(dirname ${0})/functions.sh + +# delete the bob packages from the cache otherwise the cache keeps increasing +# over and over. See https://gitlab.idiap.ch/bob/bob.admin/issues/65 +rm -rf ${CONDA_ROOT}/pkgs/bob*.tar.bz2 + +# run git clean to clean everything that is not needed. This helps to keep the +# disk usage on CI machines to minimum. +git clean -ffdx \ + --exclude="miniconda.sh" \ + --exclude="miniconda/pkgs/*.tar.bz2" \ + --exclude="miniconda/pkgs/urls.txt" \ + --exclude="miniconda/conda-bld/linux-64/*.tar.bz2" \ + --exclude="miniconda/conda-bld/osx-64/*.tar.bz2" \ + --exclude="_ci" \ + --exclude="dist/*.zip" \ + --exclude="sphinx" diff --git a/gitlab/build.sh b/gitlab/build.sh index e1a1f8e2aaf7b81f625669d778543095725f7082..a654fd30cee7a1175e04b311d41fa716207d5eb7 100755 --- a/gitlab/build.sh +++ b/gitlab/build.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# Wed 21 Sep 2016 13:08:05 CEST source $(dirname ${0})/functions.sh @@ -24,10 +23,3 @@ export_env BOB_BUILD_NUMBER run_cmd cp ./_ci/recipe_append.yaml conda/recipe_append.yaml run_cmd ${CONDA_ROOT}/bin/conda build --no-anaconda-upload --variant-config-files _ci/conda_build_config.yaml --python=${PYTHON_VERSION} conda - -# delete the bob packages from the cache otherwise the cache keeps increasing -# over and over. See https://gitlab.idiap.ch/bob/bob.admin/issues/65 -run_cmd rm -rf ${CONDA_ROOT}/pkgs/bob*.tar.bz2 - -# run git clean to clean everything that is not needed -git clean -ffdx --exclude=miniconda.sh --exclude="miniconda/pkgs/*.tar.bz2" --exclude=miniconda/pkgs/urls.txt --exclude=_ci --exclude="miniconda/conda-bld/linux-64/*.tar.bz2" --exclude="miniconda/conda-bld/osx-64/*.tar.bz2" --exclude="dist/*.zip" --exclude=sphinx