Skip to content

Commit

Permalink
ci: free disk space
Browse files Browse the repository at this point in the history
  • Loading branch information
yukkit committed Jul 6, 2023
1 parent 60e6912 commit 43c2109
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 17 deletions.
10 changes: 7 additions & 3 deletions .github/actions/setup-builder/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ description: 'Prepare Rust Build Environment'
runs:
using: "composite"
steps:
- name: clean pkg
shell: bash
run: |
bash ./.github/tools/free_disk_space.sh
- name: Install Build Dependencies
shell: bash
run: |
Expand All @@ -12,14 +16,14 @@ runs:
- name: Install Protoc
shell: bash
run: |
apt-get update
apt-get install -y protobuf-compiler
sudo apt-get update
sudo apt-get install -y protobuf-compiler
protoc --version
- name: Install psmisc
# killall
shell: bash
run: |
apt-get install -y psmisc
sudo apt-get install -y psmisc
- name: Disable incremental compilation
# Disable incremental compilation
shell: bash
Expand Down
30 changes: 30 additions & 0 deletions .github/tools/free_disk_space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash

echo "=============================================================================="
echo "Freeing up disk space on CI system"
echo "=============================================================================="

echo "Listing 100 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
df -h
echo "Removing large packages"
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^mongodb-.*'
sudo apt-get remove -y '^mysql-.*'
sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"

sudo rm -rf /opt/hostedtoolcache
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/graalvm/
sudo rm -rf /usr/local/.ghcup/
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/lib/node_modules
df -h
14 changes: 0 additions & 14 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 30
container:
image: rust
steps:
- uses: actions/checkout@v3
- name: Prepare Rust Builder
Expand All @@ -35,8 +33,6 @@ jobs:
unit-test:
name: "Unit Test"
runs-on: ubuntu-latest
container:
image: rust
steps:
- uses: actions/checkout@v3
- name: Prepare Rust Builder
Expand All @@ -55,8 +51,6 @@ jobs:
integration-test:
name: "Integration Test"
runs-on: ubuntu-latest
container:
image: rust
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -75,8 +69,6 @@ jobs:
integration-test-singleton:
name: "Integration Test Singleton"
runs-on: ubuntu-latest
container:
image: rust
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -91,8 +83,6 @@ jobs:
integration-test-3meta:
name: "Integration Test 3meta"
runs-on: ubuntu-latest
container:
image: rust
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -107,8 +97,6 @@ jobs:
integration-test-3m2d:
name: "Integration Test 3meta 2data cluster"
runs-on: ubuntu-latest
container:
image: rust
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -123,8 +111,6 @@ jobs:
integration-test-Separation-of-storage-and-computing:
name: "Integration Test Separation of storage and computing"
runs-on: ubuntu-latest
container:
image: rust
steps:
- uses: actions/checkout@v3
with:
Expand Down

0 comments on commit 43c2109

Please sign in to comment.