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.ymlindex 19430615a6..34997e39dd 100644--- a/.github/workflows/archery.yml+++ b/.github/workflows/archery.yml@@ -43,6 +43,8 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ run: ci/scripts/util_cleanup.sh- name: Setup Pythonuses: actions/setup-python@v1with:diff --git a/.github/workflows/comment_bot.yml b/.github/workflows/comment_bot.ymlindex 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.ymlindex 6e8d825940..287c0a581c 100644--- a/.github/workflows/cpp.yml+++ b/.github/workflows/cpp.yml@@ -50,6 +50,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures conda-cpp@@ -89,6 +92,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures ubuntu-cpp-sanitizerdiff --git a/.github/workflows/cpp_cron.yml b/.github/workflows/cpp_cron.ymlindex bcd0607d02..2a155a3492 100644--- a/.github/workflows/cpp_cron.yml+++ b/.github/workflows/cpp_cron.yml@@ -54,6 +54,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures debian-cpp@@ -93,6 +96,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures fedora-cpp@@ -132,6 +138,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures ubuntu-cpp@@ -164,6 +173,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: |@@ -205,6 +217,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Checkout OSS-Fuzzuses: actions/checkout@v1with:diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.ymlindex 89b272142a..6eb92b8944 100644--- a/.github/workflows/dev.yml+++ b/.github/workflows/dev.yml@@ -40,6 +40,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullrun: |docker-compose pull --ignore-pull-failures ubuntu-cpp@@ -114,6 +117,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullrun: |docker-compose pull --ignore-pull-failures ubuntu-cppdiff --git a/.github/workflows/go.yml b/.github/workflows/go.ymlindex 23ac7425f2..5accf9e1cc 100644--- a/.github/workflows/go.yml+++ b/.github/workflows/go.yml@@ -53,6 +53,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullrun: docker-compose pull --ignore-pull-failures debian-go- name: Docker Builddiff --git a/.github/workflows/integration.yml b/.github/workflows/integration.ymlindex bcbd217901..b0d01d7f5e 100644--- a/.github/workflows/integration.yml+++ b/.github/workflows/integration.yml@@ -61,6 +61,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullrun: |docker-compose pull --ignore-pull-failures conda-cppdiff --git a/.github/workflows/java.yml b/.github/workflows/java.ymlindex 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@v2with:- 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 Pullrun: docker-compose pull --ignore-pull-failures debian-java- name: Docker Builddiff --git a/.github/workflows/java_jni.yml b/.github/workflows/java_jni.ymlindex c31670c135..0e0cf1a86a 100644--- a/.github/workflows/java_jni.yml+++ b/.github/workflows/java_jni.yml@@ -57,6 +57,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullrun: |docker-compose pull --ignore-pull-failures debian-javadiff --git a/.github/workflows/js.yml b/.github/workflows/js.ymlindex ddebe5b234..fdc852ab52 100644--- a/.github/workflows/js.yml+++ b/.github/workflows/js.yml@@ -53,6 +53,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullrun: docker-compose pull --ignore-pull-failures debian-js- name: Docker Builddiff --git a/.github/workflows/python.yml b/.github/workflows/python.ymlindex 3e125435e2..bf41cfb7a5 100644--- a/.github/workflows/python.yml+++ b/.github/workflows/python.yml@@ -51,6 +51,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: |@@ -91,6 +94,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: |@@ -133,6 +139,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: |@@ -216,6 +225,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: docker-compose pull centos-python-manylinux1diff --git a/.github/workflows/python_cron.yml b/.github/workflows/python_cron.ymlindex 41c905497c..4f90493284 100644--- a/.github/workflows/python_cron.yml+++ b/.github/workflows/python_cron.yml@@ -52,6 +52,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: |@@ -92,6 +95,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: |@@ -132,6 +138,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: |@@ -209,6 +218,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: |diff --git a/.github/workflows/r.yml b/.github/workflows/r.ymlindex a9f72934b7..1e40951072 100644--- a/.github/workflows/r.yml+++ b/.github/workflows/r.yml@@ -64,6 +64,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: |@@ -112,6 +115,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: docker-compose pull --ignore-pull-failures rdiff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.ymlindex ef0df90cb1..c7ceccbb8e 100644--- a/.github/workflows/ruby.yml+++ b/.github/workflows/ruby.yml@@ -60,6 +60,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullshell: bashrun: |diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.ymlindex 4341858556..333f7f80b9 100644--- a/.github/workflows/rust.yml+++ b/.github/workflows/rust.yml@@ -59,6 +59,9 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh+ - name: Free Up Disk Space+ shell: bash+ run: ci/scripts/util_cleanup.sh- name: Docker Pullrun: docker-compose pull --ignore-pull-failures debian-rust- name: Docker Builddiff --git a/ci/scripts/util_cleanup.sh b/ci/scripts/util_cleanup.shnew file mode 100755index 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 -hdiff --git a/dev/tasks/docker-tests/github.linux.yml b/dev/tasks/docker-tests/github.linux.ymlindex 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_HEADgit -C arrow submodule update --init --recursive+ - name: Free Up Disk Space+ shell: bash+ run: arrow/ci/scripts/util_cleanup.sh- name: Run Docker Buildshell: bashrun: |diff --git a/dev/tasks/linux-packages/github.linux.arm64.yml b/dev/tasks/linux-packages/github.linux.arm64.ymlindex 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_HEADgit -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.ymlindex 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_HEADgit -C arrow submodule update --init --recursive+ - name: Free Up Disk Space+ shell: bash+ run: arrow/ci/scripts/util_cleanup.sh- name: Buildrun: |set -ediff --git a/dev/tasks/r/github.linux.cran.yml b/dev/tasks/r/github.linux.cran.ymlindex 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_HEADgit -C arrow submodule update --init --recursive+ - name: Free Up Disk Space+ shell: bash+ run: arrow/ci/scripts/util_cleanup.sh- name: Fetch Submodules and Tagsshell: bashrun: cd arrow && ci/scripts/util_checkout.shdiff --git a/dev/tasks/verify-rc/github.nix.yml b/dev/tasks/verify-rc/github.nix.ymlindex 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_HEADgit -C arrow submodule update --init --recursive+ - name: Free Up Disk Space+ shell: bash+ run: arrow/ci/scripts/util_cleanup.sh- name: Fetch Submodules and Tagsshell: bashrun: cd arrow && ci/scripts/util_checkout.sh