Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.*.sw[po]

# Directories created during the build, containing build artifacts
ccache
dist
download
envs
Expand Down
1 change: 1 addition & 0 deletions cygwin-gap-build.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
autoconf
automake
ccache
cddlib-devel
gcc-core
gcc-core
Expand Down
27 changes: 26 additions & 1 deletion release_gap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
export CCACHE_DIR="\$(cygpath -u '$(cygpath -w -a ccache)')"
export CCACHE_BASEDIR=/opt
export CCACHE_COMPILERCHECK=content
export CCACHE_COMPRESS=1
EOF
tools/subcyg "${ENV_BUILD_DIR}" "ccache -M 2G && ccache -z"
USE_CCACHE=yes
fi
# A bit of cleanup
rm -f envs/build-${GAP_VERSION}-x86_64/Cygwin*.{bat,ico}
Expand Down Expand Up @@ -89,6 +108,12 @@ echo "::group::Build Packages"
tools/subcyg "${ENV_BUILD_DIR}" "cd ${GAP_ROOT}/pkg && (../bin/BuildPackages.sh --parallel || true)"
echo "::endgroup::"

if [ "${USE_CCACHE}" = yes ]; then
echo "::group::ccache statistics"
tools/subcyg "${ENV_BUILD_DIR}" "ccache -s"
echo "::endgroup::"
fi

# gap-prep-runtime
echo "::group::gap-prep-runtime"
mkdir -p $(dirname ${GAP_ROOT_RUNTIME})
Expand Down
2 changes: 1 addition & 1 deletion tools/subcyg
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pid=$!
# sometimes there can be a delay.
sleep 1
if [ -f "$subcyg_root$outtmp" ]; then
tail -F --pid=$pid "$subcyg_root$outtmp" 2>/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.
Expand Down
Loading