forked from osmocom/wireshark
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.
This commit is contained in:
parent
f5f561d5c7
commit
a30774d8c1
|
@ -141,10 +141,12 @@ variables:
|
||||||
paths:
|
paths:
|
||||||
- ccache/
|
- ccache/
|
||||||
before_script:
|
before_script:
|
||||||
# It might make sense to set "GIT_STRATEGY: none" and build from
|
- BUILD_DIR=$(ls wireshark-*.tar.*)
|
||||||
# the tarball.
|
- BUILD_DIR=${BUILD_DIR%%.tar.*}
|
||||||
- mkdir -p ccache
|
- mkdir -p ccache
|
||||||
- ccache --show-stats
|
- 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.email "you@example.com"
|
||||||
- git config --global user.name "Your Name"
|
- git config --global user.name "Your Name"
|
||||||
- mkdir build
|
- mkdir build
|
||||||
|
@ -154,7 +156,7 @@ variables:
|
||||||
after_script:
|
after_script:
|
||||||
# The cache should be large enough to be useful but it shouldn't take
|
# The cache should be large enough to be useful but it shouldn't take
|
||||||
# too long to restore+save each run.
|
# 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:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build/packaging/rpm/RPMS
|
- build/packaging/rpm/RPMS
|
||||||
|
|
Loading…
Reference in New Issue