Browse Source

wipe more directories to free up space

Jonathan Kelley 1 year ago
parent
commit
472de4198d
2 changed files with 15 additions and 7 deletions
  1. 12 0
      .github/free_space.sh
  2. 3 7
      .github/workflows/main.yml

+ 12 - 0
.github/free_space.sh

@@ -0,0 +1,12 @@
+df -h
+sudo rm -rf ${GITHUB_WORKSPACE}/.git
+sudo rm -rf "$AGENT_TOOLSDIRECTORY"
+sudo rm -rf /usr/share/dotnet
+sudo apt-get remove -y '^ghc-8.*'
+sudo apt-get remove -y '^dotnet-.*'
+sudo apt-get remove -y '^llvm-.*'
+sudo apt-get remove -y 'php.*'
+sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel
+sudo apt-get autoremove -y
+sudo apt-get clean
+df -h

+ 3 - 7
.github/workflows/main.yml

@@ -69,12 +69,7 @@ jobs:
       - uses: davidB/rust-cargo-make@v1
       - uses: davidB/rust-cargo-make@v1
       - uses: browser-actions/setup-firefox@latest
       - uses: browser-actions/setup-firefox@latest
       - uses: jetli/wasm-pack-action@v0.4.0
       - uses: jetli/wasm-pack-action@v0.4.0
-      - run: sudo rm -rf /usr/share/dotnet
-      - run: sudo rm -rf "$AGENT_TOOLSDIRECTORY"
-      - run: |
-          df -h
-          sudo rm -rf ${GITHUB_WORKSPACE}/.git
-          df -h
+      - run: bash ./github/free_space.sh
       - run: cargo make tests
       - run: cargo make tests
 
 
   fmt:
   fmt:
@@ -160,6 +155,7 @@ jobs:
       - uses: actions/setup-node@v4
       - uses: actions/setup-node@v4
         with:
         with:
           node-version: 16
           node-version: 16
+      - run: bash ./github/free_space.sh
       - name: Install Rust
       - name: Install Rust
         uses: dtolnay/rust-toolchain@master
         uses: dtolnay/rust-toolchain@master
         with:
         with:
@@ -249,7 +245,7 @@ jobs:
         if: ${{ matrix.platform.cross == true }}
         if: ${{ matrix.platform.cross == true }}
 
 
         uses: taiki-e/install-action@cross
         uses: taiki-e/install-action@cross
-
+      - run: bash ./github/free_space.sh
       - uses: Swatinem/rust-cache@v2
       - uses: Swatinem/rust-cache@v2
         with:
         with:
           key: "${{ matrix.platform.target }}"
           key: "${{ matrix.platform.target }}"