test better disk reclamation

This commit is contained in:
Daylin Morgan 2024-06-14 12:17:39 -05:00
parent 5783bf1b77
commit fb09facde4
Signed by: daylin
GPG key ID: 950D13E9719334AD
4 changed files with 37 additions and 14 deletions

View file

@ -29,20 +29,39 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# The default disk size of these runners is ~14GB # # The default disk size of these runners is ~14GB
# Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840. # # Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840.
- name: Cleanup Disk Space # - name: Cleanup Disk Space
run: | # run: |
echo "Before removing files:" # echo "Before removing files:"
df -h # df -h
sudo rm -rf /usr/share/dotnet # sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /opt/ghc # sudo rm -rf /opt
sudo rm -rf /opt # sudo rm -rf /usr/share/dotnet
sudo rm -rf "/usr/local/share/boost" # sudo rm -rf /usr/local/{lib/android,share/boost}
sudo rm -rf "$AGENT_TOOLSDIRECTORY" # sudo docker image prune --all --force
echo "After removing files:" # echo "After removing files:"
df -h # df -h
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v3
with:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
remove-large-packages: 'true'
remove-cached-tools: 'true'
remove-swapfile: 'true'
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
echo "Free space:"
df -h
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/nix-installer-action@main

View file

@ -48,4 +48,4 @@ jobs:
- name: Build - name: Build
run: | run: |
cachix watch-exec daylin -- nix build '.#checks.x86_64-linux.packageCheck' cachix watch-exec daylin -- nix build --accept-flake-config '.#checks.x86_64-linux.packageCheck'

View file

@ -14,6 +14,7 @@ jobs:
secrets: inherit secrets: inherit
build: build:
needs: checks
strategy: strategy:
max-parallel: 1 max-parallel: 1
matrix: matrix:

View file

@ -95,6 +95,9 @@ rec {
inputs.roc.packages.${pkgs.system}.full inputs.roc.packages.${pkgs.system}.full
inputs.roc.packages.${pkgs.system}.lang-server inputs.roc.packages.${pkgs.system}.lang-server
inputs.zls.outputs.packages.${pkgs.system}.default
inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin
]; ];
}; };
}); });