Skip to content

Commit

Permalink
Avoid caching build artefacts
Browse files Browse the repository at this point in the history
When we copy the whole boost-root AFTER the build(s) it will contain
also build artefacts such as the bin.v2 folder.
When restoring that later B2 might skip parts of the build although it
should not.
Make a copy after the initial setup & bootstrap.
  • Loading branch information
Flamefire committed Nov 27, 2024
1 parent 2462572 commit dacc6bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ jobs:
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}

- name: Prepare for cache
if: ${{ env.BOOST_ROOT != '' }}
run: rm -rf boost-root; mv "${BOOST_ROOT}" boost-root
if: ${{ env.BOOST_ROOT_CACHE != '' }}
run: rm -rf boost-root; mv "${BOOST_ROOT_CACHE}" boost-root
working-directory: ${{github.workspace}}
windows:
defaults:
Expand Down
5 changes: 5 additions & 0 deletions ci/github/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ fi

. $(dirname "${BASH_SOURCE[0]}")/../common_install.sh

# Save the state before building anything to avoid caching build artefacts
BOOST_ROOT_CACHE="${BOOST_ROOT}-for-cache"
echo "BOOST_ROOT_CACHE=$BOOST_ROOT_CACHE" >> $GITHUB_ENV
cp -r "$BOOST_ROOT" "$BOOST_ROOT_CACHE"

# Persist the environment for all future steps

# Set by common_install.sh
Expand Down

0 comments on commit dacc6bd

Please sign in to comment.