forked from enlightenment/efl
ci: automatically clear config.cache if it cannot be used
Summary: if env vars change between runs then the cache is invalidated, causing configure to print a very specific error by running a separate script to catch this error, the build can detect and clear the cache when necessary to avoid having to manually disable the cache when changing build settings Depends on D6697 Reviewers: stefan_schmidt, bu5hm4n Reviewed By: bu5hm4n Subscribers: bu5hm4n, cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6732
This commit is contained in:
parent
e382bac1a0
commit
1edf1295e8
|
@ -57,7 +57,7 @@ if [ "$DISTRO" != "" ] ; then
|
||||||
travis_fold configure "configure $OPTS"
|
travis_fold configure "configure $OPTS"
|
||||||
docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
|
docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
|
||||||
--env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
|
--env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
|
||||||
--env LD="ld.gold" $(cat $HOME/cid) sh -c "./configure $OPTS || cat config.log"
|
--env LD="ld.gold" $(cat $HOME/cid) sh -c ".ci/configure.sh $OPTS"
|
||||||
travis_endfold configure
|
travis_endfold configure
|
||||||
else
|
else
|
||||||
OSX_COPTS="--disable-cxx-bindings --with-tests=regular --disable-dependency-tracking -C"
|
OSX_COPTS="--disable-cxx-bindings --with-tests=regular --disable-dependency-tracking -C"
|
||||||
|
@ -78,6 +78,6 @@ else
|
||||||
autoreconf -iv
|
autoreconf -iv
|
||||||
travis_endfold autoreconf
|
travis_endfold autoreconf
|
||||||
travis_fold configure "configure $OSX_COPTS"
|
travis_fold configure "configure $OSX_COPTS"
|
||||||
./configure $OSX_COPTS || cat config.log
|
.ci/configure.sh $OSX_COPTS
|
||||||
travis_endfold configure
|
travis_endfold configure
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
set -o pipefail
|
||||||
|
export TEST_VAR=1
|
||||||
|
if ! ./configure $@ | tee -a configlog ; then
|
||||||
|
if grep -q 'configure: error: changes in the environment can compromise the build' configlog ; then
|
||||||
|
echo "clearing config.cache and retrying..."
|
||||||
|
rm -f configlog config.cache
|
||||||
|
./configure $@
|
||||||
|
fi
|
||||||
|
fi
|
|
@ -84,6 +84,11 @@ before_script:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- .ci/ci-ccache-stats.sh
|
- .ci/ci-ccache-stats.sh
|
||||||
|
- |
|
||||||
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
|
cp $HOME/cachedir/config.cache . || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- .ci/ci-configure.sh "$CI_BUILD_TYPE"
|
- .ci/ci-configure.sh "$CI_BUILD_TYPE"
|
||||||
|
|
Loading…
Reference in New Issue