Skip to content

Apache DataFusion SQL Query Engine

ARROW-8524: [CI] Free up space on github actions

Krisztián Szűcse98b8b80bbdc
diff --git a/.github/workflows/archery.yml b/.github/workflows/archery.yml
index 19430615a6..34997e39dd 100644
--- a/.github/workflows/archery.yml
+++ b/.github/workflows/archery.yml
@@ -43,6 +43,8 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ run: ci/scripts/util_cleanup.sh
- name: Setup Python
uses: actions/setup-python@v1
with:
diff --git a/.github/workflows/comment_bot.yml b/.github/workflows/comment_bot.yml
index 4eed86901e..ded6fa3b4d 100644
--- a/.github/workflows/comment_bot.yml
+++ b/.github/workflows/comment_bot.yml
@@ -53,6 +53,7 @@ jobs:
archery trigger-bot \
--event-name ${{ github.event_name }} \
--event-payload ${{ github.event_path }}
+
autotune:
name: "Fix all the things"
if: startsWith(github.event.comment.body, 'autotune')
diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index 6e8d825940..287c0a581c 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -50,6 +50,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: docker-compose pull --ignore-pull-failures conda-cpp
@@ -89,6 +92,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: docker-compose pull --ignore-pull-failures ubuntu-cpp-sanitizer
diff --git a/.github/workflows/cpp_cron.yml b/.github/workflows/cpp_cron.yml
index bcd0607d02..2a155a3492 100644
--- a/.github/workflows/cpp_cron.yml
+++ b/.github/workflows/cpp_cron.yml
@@ -54,6 +54,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: docker-compose pull --ignore-pull-failures debian-cpp
@@ -93,6 +96,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: docker-compose pull --ignore-pull-failures fedora-cpp
@@ -132,6 +138,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: docker-compose pull --ignore-pull-failures ubuntu-cpp
@@ -164,6 +173,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: |
@@ -205,6 +217,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Checkout OSS-Fuzz
uses: actions/checkout@v1
with:
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml
index 89b272142a..6eb92b8944 100644
--- a/.github/workflows/dev.yml
+++ b/.github/workflows/dev.yml
@@ -40,6 +40,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
run: |
docker-compose pull --ignore-pull-failures ubuntu-cpp
@@ -114,6 +117,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
run: |
docker-compose pull --ignore-pull-failures ubuntu-cpp
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 23ac7425f2..5accf9e1cc 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -53,6 +53,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
run: docker-compose pull --ignore-pull-failures debian-go
- name: Docker Build
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index bcbd217901..b0d01d7f5e 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -61,6 +61,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
run: |
docker-compose pull --ignore-pull-failures conda-cpp
diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml
index 79e030f1b8..6869283977 100644
--- a/.github/workflows/java.yml
+++ b/.github/workflows/java.yml
@@ -55,9 +55,15 @@ jobs:
MAVEN: ${{ matrix.maven }}
steps:
- name: Checkout Arrow
- uses: actions/checkout@v1
+ uses: actions/checkout@v2
with:
- submodules: true
+ fetch-depth: 0
+ - name: Fetch Submodules and Tags
+ shell: bash
+ run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
run: docker-compose pull --ignore-pull-failures debian-java
- name: Docker Build
diff --git a/.github/workflows/java_jni.yml b/.github/workflows/java_jni.yml
index c31670c135..0e0cf1a86a 100644
--- a/.github/workflows/java_jni.yml
+++ b/.github/workflows/java_jni.yml
@@ -57,6 +57,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
run: |
docker-compose pull --ignore-pull-failures debian-java
diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml
index ddebe5b234..fdc852ab52 100644
--- a/.github/workflows/js.yml
+++ b/.github/workflows/js.yml
@@ -53,6 +53,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
run: docker-compose pull --ignore-pull-failures debian-js
- name: Docker Build
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index 3e125435e2..bf41cfb7a5 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -51,6 +51,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: |
@@ -91,6 +94,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: |
@@ -133,6 +139,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: |
@@ -216,6 +225,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: docker-compose pull centos-python-manylinux1
diff --git a/.github/workflows/python_cron.yml b/.github/workflows/python_cron.yml
index 41c905497c..4f90493284 100644
--- a/.github/workflows/python_cron.yml
+++ b/.github/workflows/python_cron.yml
@@ -52,6 +52,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: |
@@ -92,6 +95,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: |
@@ -132,6 +138,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: |
@@ -209,6 +218,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: |
diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml
index a9f72934b7..1e40951072 100644
--- a/.github/workflows/r.yml
+++ b/.github/workflows/r.yml
@@ -64,6 +64,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: |
@@ -112,6 +115,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: docker-compose pull --ignore-pull-failures r
diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml
index ef0df90cb1..c7ceccbb8e 100644
--- a/.github/workflows/ruby.yml
+++ b/.github/workflows/ruby.yml
@@ -60,6 +60,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
shell: bash
run: |
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 4341858556..333f7f80b9 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -59,6 +59,9 @@ jobs:
- name: Fetch Submodules and Tags
shell: bash
run: ci/scripts/util_checkout.sh
+ - name: Free Up Disk Space
+ shell: bash
+ run: ci/scripts/util_cleanup.sh
- name: Docker Pull
run: docker-compose pull --ignore-pull-failures debian-rust
- name: Docker Build
diff --git a/ci/scripts/util_cleanup.sh b/ci/scripts/util_cleanup.sh
new file mode 100755
index 0000000000..521b49e684
--- /dev/null
+++ b/ci/scripts/util_cleanup.sh
@@ -0,0 +1,37 @@
+#!/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.
+
+# this script is github actions specific to free up disk space
+
+if [ $RUNNER_OS = "Linux" ]; then
+ # remove swap
+ sudo swapoff -a
+ sudo rm -f /swapfile
+
+ # clean apt cache
+ sudo apt clean
+
+ # remove haskell, consumes 8.6 GB
+ sudo rm -rf /opt/ghc
+
+ # remove cached docker images, around 13 GB
+ docker rmi $(docker image ls -aq)
+fi
+
+df -h
diff --git a/dev/tasks/docker-tests/github.linux.yml b/dev/tasks/docker-tests/github.linux.yml
index 06a90b8d95..e7496bb3b7 100644
--- a/dev/tasks/docker-tests/github.linux.yml
+++ b/dev/tasks/docker-tests/github.linux.yml
@@ -36,6 +36,9 @@ jobs:
git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
git -C arrow checkout FETCH_HEAD
git -C arrow submodule update --init --recursive
+ - name: Free Up Disk Space
+ shell: bash
+ run: arrow/ci/scripts/util_cleanup.sh
- name: Run Docker Build
shell: bash
run: |
diff --git a/dev/tasks/linux-packages/github.linux.arm64.yml b/dev/tasks/linux-packages/github.linux.arm64.yml
index f2fc32dda6..d82e7fe808 100644
--- a/dev/tasks/linux-packages/github.linux.arm64.yml
+++ b/dev/tasks/linux-packages/github.linux.arm64.yml
@@ -37,6 +37,10 @@ jobs:
git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
git -C arrow checkout FETCH_HEAD
git -C arrow submodule update --init --recursive
+ - name: Free Up Disk Space
+ shell: bash
+ run: arrow/ci/scripts/util_cleanup.sh
+
# We can remove this with binfmt-support 2.1.7 or later and
# qemu-user-static 2.12 or later. It requires Debian buster or later,
# or Ubuntu 18.10 or later.
diff --git a/dev/tasks/linux-packages/github.linux.yml b/dev/tasks/linux-packages/github.linux.yml
index a6b401f54d..f04a2acffe 100644
--- a/dev/tasks/linux-packages/github.linux.yml
+++ b/dev/tasks/linux-packages/github.linux.yml
@@ -37,6 +37,9 @@ jobs:
git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
git -C arrow checkout FETCH_HEAD
git -C arrow submodule update --init --recursive
+ - name: Free Up Disk Space
+ shell: bash
+ run: arrow/ci/scripts/util_cleanup.sh
- name: Build
run: |
set -e
diff --git a/dev/tasks/r/github.linux.cran.yml b/dev/tasks/r/github.linux.cran.yml
index 0a5362b498..8d0c126263 100644
--- a/dev/tasks/r/github.linux.cran.yml
+++ b/dev/tasks/r/github.linux.cran.yml
@@ -50,6 +50,9 @@ jobs:
git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
git -C arrow checkout FETCH_HEAD
git -C arrow submodule update --init --recursive
+ - name: Free Up Disk Space
+ shell: bash
+ run: arrow/ci/scripts/util_cleanup.sh
- name: Fetch Submodules and Tags
shell: bash
run: cd arrow && ci/scripts/util_checkout.sh
diff --git a/dev/tasks/verify-rc/github.nix.yml b/dev/tasks/verify-rc/github.nix.yml
index 09455eeb51..dc0dc2858d 100644
--- a/dev/tasks/verify-rc/github.nix.yml
+++ b/dev/tasks/verify-rc/github.nix.yml
@@ -35,6 +35,9 @@ jobs:
git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
git -C arrow checkout FETCH_HEAD
git -C arrow submodule update --init --recursive
+ - name: Free Up Disk Space
+ shell: bash
+ run: arrow/ci/scripts/util_cleanup.sh
- name: Fetch Submodules and Tags
shell: bash
run: cd arrow && ci/scripts/util_checkout.sh