aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2022-10-20 13:21:10 -0700
committerGerald Combs <gerald@wireshark.org>2022-10-20 13:49:40 -0700
commita30774d8c178ede2a5115cb497aefc38f3cf6e6a (patch)
treed1da45c9cf138ccb3cb7d87403ca6205b4c66d13 /.gitlab-ci.yml
parentf5f561d5c77a93cabad1b1fafc783373ccb472e2 (diff)
GitLab CI: Set ccache's base_dir for RPM builds.
GitLab CI builds RPMs in a different directory for each pipeline ($CI_PROJECT_DIR/build/packaging/rpm/BUILD/wireshark-<version>), so set base_dir to the build directory and enable absolute_paths_in_stderr. Fix our cache directory max sizes as well.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml8
1 files changed, 5 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 77f5dafab1..36f710d507 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -141,10 +141,12 @@ variables:
paths:
- ccache/
before_script:
- # It might make sense to set "GIT_STRATEGY: none" and build from
- # the tarball.
+ - BUILD_DIR=$(ls wireshark-*.tar.*)
+ - BUILD_DIR=${BUILD_DIR%%.tar.*}
- mkdir -p ccache
- ccache --show-stats
+ - ccache --set-config absolute_paths_in_stderr=true
+ - ccache --set-config base_dir="$CI_PROJECT_DIR/build/packaging/rpm/BUILD/$BUILD_DIR"
- git config --global user.email "you@example.com"
- git config --global user.name "Your Name"
- mkdir build
@@ -154,7 +156,7 @@ variables:
after_script:
# The cache should be large enough to be useful but it shouldn't take
# too long to restore+save each run.
- - ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
+ - ccache --max-size $( du --summarize --block-size=1M $CI_PROJECT_DIR/build/packaging/rpm/BUILD/wireshark-* | awk '{printf ("%dM", $1 * 1.5)}' )
artifacts:
paths:
- build/packaging/rpm/RPMS