Skip to content

Commit

Permalink
Fix LLVM space issues (#1035)
Browse files Browse the repository at this point in the history
Clearing space by mounting host to container volume and clearing unused files
  • Loading branch information
ekilmer authored Oct 12, 2023
1 parent b4065be commit 099e27a
Showing 1 changed file with 43 additions and 4 deletions.
47 changes: 43 additions & 4 deletions .github/workflows/vcpkg_ci_amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,22 @@ jobs:

container:
image: docker.pkg.github.com/lifting-bits/cxx-common/vcpkg-builder-${{ matrix.image.name }}:${{ matrix.image.tag }}
volumes:
- /:/gha-runner
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

name: ${{matrix.image.os}}-${{matrix.image.tag}} ${{matrix.llvm}} ${{matrix.target_arch}}
runs-on: ubuntu-latest # run the job on the newly created runner
steps:
- name: Free Disk Space
run: |
df -h
rm -rf /gha-runner/usr/local/lib/android
rm -rf /gha-runner/usr/local/share/boost
df -h
- name: Set Artifact Name
run: |
# Need to fix because paths with brackets cause issues
Expand Down Expand Up @@ -117,16 +126,33 @@ jobs:
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
"${{ secrets.GITHUB_TOKEN }}"
./build_dependencies.sh --release --target-arch ${{ matrix.target_arch }} --export-dir ./${{ env.ARTIFACT_NAME }} --clean-after-build --debug
rm -rf vcpkg/downloads
rm -rf ~/.nuget/packages
echo "Check space..."
df -h
echo "DONE."
./build_dependencies.sh --release --target-arch ${{ matrix.target_arch }} --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build --debug
echo "VCPKG_ROOT=$(pwd)/${{ env.ARTIFACT_NAME }}" >> $GITHUB_ENV
echo "TARGET_TRIPLET=${{ matrix.target_arch }}-linux-rel" >> $GITHUB_ENV
- name: Cleanup NuGet
shell: 'bash'
- name: Check space
if: failure()
run: |
du -sh ~/.nuget || true
rm -rf ~/.nuget || true
echo "## Space left"
df -h
echo ""
echo "## Storage in working directory"
du -hs *
echo ""
echo "## Storage in vcpkg"
du -hs vcpkg/*
echo ""
echo "## Storage in nuget"
du -hs ~/.nuget/*
- name: Upload CMake logs on error
if: failure()
Expand All @@ -135,6 +161,19 @@ jobs:
name: ${{ env.ARTIFACT_NAME }}_logs
path: ${{ github.workspace }}/vcpkg/buildtrees/**/*.log

- name: Cleanup
shell: 'bash'
run: |
echo "Space left"
df -h
echo "Cleaning up..."
rm -rf vcpkg || true
rm -rf ~/.nuget || true
echo "Space left"
df -h
- name: 'Export Packages'
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
shell: 'bash'
Expand Down

0 comments on commit 099e27a

Please sign in to comment.