Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
19 changes: 11 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,12 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}

- name: Free up disk space
- name: Free up disk space on Ubuntu
run: |
# Remove unnecessary files on macOS
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /usr/local/.ghcup || true
sudo rm -rf /usr/local/lib/node_modules || true
brew cleanup || true
# Clear pip cache
pip cache purge || true
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -68,6 +65,12 @@ jobs:
--load \
.

# Free up build cache before building the next image.
# buildx --load exports a tarball then imports layers, so both
# exist on disk at once. Pruning the builder cache between builds
# reclaims enough space for the sandbox image to load.
docker builder prune -f

# Build sandbox-image with expected tag
SANDBOX_HASH=$(sha256sum dockerfiles/Dockerfile.sandbox | cut -d' ' -f1 | cut -c1-12)
SANDBOX_TAG="locally-built-dockerfiles-dockerfile-sandbox:${SANDBOX_HASH}"
Expand Down
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

# Use the base image with Python 3.10 and Flask
FROM tiangolo/uwsgi-nginx-flask:python3.10
ARG CACHEBUST=2026-02-12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CACHEBUST ARG invalidates the entire Docker cache on every build since it's placed early in the Dockerfile. This defeats the purpose of the --cache-from and --cache-to flags in .github/workflows/tests.yml:63-64,82-83.

If this was added only for testing purposes (as suggested by the commit message "to test full uncached CI build"), it should be removed before merging.

If cache invalidation is needed permanently, consider:

  1. Moving it later in the Dockerfile (after stable layers)
  2. Passing it as a build-arg with a timestamp: --build-arg CACHEBUST=$(date +%s)
  3. Removing it entirely if the docker builder prune -f on line 72 of tests.yml already solves the disk space issue


# Install dependencies required for Lean 4, pypy3, and other tools
ARG TARGETARCH
Expand Down