diff --git a/.gitignore b/.gitignore index d290454..4762d87 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .*.sw[po] # Directories created during the build, containing build artifacts +ccache dist download envs diff --git a/cygwin-gap-build.list b/cygwin-gap-build.list index fb3b417..fc5f1da 100644 --- a/cygwin-gap-build.list +++ b/cygwin-gap-build.list @@ -1,5 +1,6 @@ autoconf automake +ccache cddlib-devel gcc-core gcc-core diff --git a/release_gap.sh b/release_gap.sh index b7ee9ad..82f3e18 100755 --- a/release_gap.sh +++ b/release_gap.sh @@ -37,9 +37,28 @@ download/setup-x86_64.exe --site ${CYGWIN_MIRROR} \ --arch x86_64 --no-admin --no-shortcuts --quiet-mode # Install symlinks for CCACHE -if [ -x envs/build-${GAP_VERSION}-x86_64/usr/bin/ccache ]; then +# (the build env mounts its bin/ as /usr/bin, so that is where setup puts it) +if [ -f envs/build-${GAP_VERSION}-x86_64/bin/ccache.exe ]; then + mkdir -p envs/build-${GAP_VERSION}-x86_64/usr/local/bin ln -s /usr/bin/ccache envs/build-${GAP_VERSION}-x86_64/usr/local/bin/gcc ln -s /usr/bin/ccache envs/build-${GAP_VERSION}-x86_64/usr/local/bin/g++ + + # The cache lives outside the build env, whose path contains the GAP + # version, so that CI can keep it across builds. subcyg clears the + # environment, hence a profile script; it receives a Windows path because + # a POSIX path means something else in the build env's Cygwin. + # CCACHE_BASEDIR makes the versioned paths below /opt relative, and the + # compiler is reinstalled for every build, so check its content, not its + # mtime. + mkdir -p ccache + cat > envs/build-${GAP_VERSION}-x86_64/etc/profile.d/ccache.sh </dev/null + tail -n +1 -F --pid=$pid "$subcyg_root$outtmp" 2>/dev/null if [ $? -eq 130 ]; then # tail was interrupted by Ctrl-C, so treat this as though the # wrapped command were terminated as well.