From fb09facde40136898f6a4419e89647e14328ba2f Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Fri, 14 Jun 2024 12:17:39 -0500 Subject: [PATCH] test better disk reclamation --- .github/workflows/build.yml | 45 +++++++++++++++++++++++++----------- .github/workflows/checks.yml | 2 +- .github/workflows/push.yml | 1 + lib/default.nix | 3 +++ 4 files changed, 37 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 006cb93..8d7bde3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,20 +29,39 @@ jobs: build: runs-on: ubuntu-latest steps: - # The default disk size of these runners is ~14GB - # Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840. - - name: Cleanup Disk Space - run: | - echo "Before removing files:" - df -h - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf /opt - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - echo "After removing files:" - df -h + # # The default disk size of these runners is ~14GB + # # Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840. + # - name: Cleanup Disk Space + # run: | + # echo "Before removing files:" + # df -h + # sudo rm -rf "$AGENT_TOOLSDIRECTORY" + # sudo rm -rf /opt + # sudo rm -rf /usr/share/dotnet + # sudo rm -rf /usr/local/{lib/android,share/boost} + # sudo docker image prune --all --force + # echo "After removing files:" + # 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: DeterminateSystems/nix-installer-action@main diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 59ee405..929d4e6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -48,4 +48,4 @@ jobs: - name: Build 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' diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 955e620..1b381e2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -14,6 +14,7 @@ jobs: secrets: inherit build: + needs: checks strategy: max-parallel: 1 matrix: diff --git a/lib/default.nix b/lib/default.nix index b4b865b..44a2889 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -95,6 +95,9 @@ rec { inputs.roc.packages.${pkgs.system}.full inputs.roc.packages.${pkgs.system}.lang-server + + inputs.zls.outputs.packages.${pkgs.system}.default + inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin ]; }; });