Skip to content

Commit

Permalink
[#2691] feat(CI): free up disk space in github workflow (#2692)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Free up disk space in github workflow, make Doris container start up
successful


### Why are the changes needed?

Fix: #2691 

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?

UT
  • Loading branch information
zhoukangcn authored Mar 27, 2024
1 parent 66addc7 commit 99b4957
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/backend-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
if: ${{ contains(github.event.pull_request.labels.*.name, 'debug action') }}
uses: csexton/debugger-action@master

- name: Free up disk space
run: |
dev/ci/util_free_space.sh
- name: Backend Integration Test
id: integrationTest
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/frontend-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
if: ${{ contains(github.event.pull_request.labels.*.name, 'debug action') }}
uses: csexton/debugger-action@master

- name: Free up disk space
run: |
dev/ci/util_free_space.sh
- name: Frontend Integration Test
id: integrationTest
run: |
Expand Down
3 changes: 3 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,6 @@
Trino
./integration-test-common/src/test/java/com/datastrato/gravitino/integration/test/util/CloseableGroup.java
./trino-connector/src/main/java/com/datastrato/gravitino/trino/connector/catalog/hive/SortingColumn.java

Apache Arrow
./dev/ci/util_free_space.sh
3 changes: 3 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ Copyright 2011-2023 The Apache Software Foundation
Apache Submarine
Copyright 2019 and onwards The Apache Software Foundation.

Apache Arrow
Copyright 2016-2024 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
73 changes: 73 additions & 0 deletions dev/ci/util_free_space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Copied from Apache Arrow: ci/scripts/util_free_space.sh

set -eux

if [ "${GITHUB_ACTIONS}" = "true" ]; then
df -h
echo "::group::/usr/local/*"
du -hsc /usr/local/*
echo "::endgroup::"
echo "::group::/usr/local/bin/*"
du -hsc /usr/local/bin/*
echo "::endgroup::"
# ~1GB (From 1.2GB to 214MB)
sudo rm -rf \
/usr/local/bin/aliyun \
/usr/local/bin/azcopy \
/usr/local/bin/bicep \
/usr/local/bin/cmake-gui \
/usr/local/bin/cpack \
/usr/local/bin/helm \
/usr/local/bin/hub \
/usr/local/bin/kubectl \
/usr/local/bin/minikube \
/usr/local/bin/node \
/usr/local/bin/packer \
/usr/local/bin/pulumi* \
/usr/local/bin/stack \
/usr/local/bin/terraform || :
echo "::group::/usr/local/share/*"
du -hsc /usr/local/share/*
echo "::endgroup::"
# 1.3GB
sudo rm -rf /usr/local/share/powershell || :
echo "::group::/opt/*"
du -hsc /opt/*
echo "::endgroup::"
echo "::group::/opt/hostedtoolcache/*"
du -hsc /opt/hostedtoolcache/*
echo "::endgroup::"
# 5.3GB
sudo rm -rf /opt/hostedtoolcache/CodeQL || :
# 1.4GB
sudo rm -rf /opt/hostedtoolcache/go || :
# 489MB
sudo rm -rf /opt/hostedtoolcache/PyPy || :
# 376MB
sudo rm -rf /opt/hostedtoolcache/node || :
# Remove Web browser packages
sudo apt purge -y \
firefox \
google-chrome-stable \
microsoft-edge-stable
df -h
fi

0 comments on commit 99b4957

Please sign in to comment.