diff --git a/.github/workflows/cmake_install.yml b/.github/workflows/cmake_install.yml index 63936062ed..a4f2312fe9 100644 --- a/.github/workflows/cmake_install.yml +++ b/.github/workflows/cmake_install.yml @@ -198,6 +198,8 @@ jobs: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: submodules: 'recursive' + - name: Free Disk Space + run: ./ci/free_disk_space.sh - name: Install Conan run: | python3 -m pip install pip==25.0.1 @@ -235,6 +237,8 @@ jobs: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: submodules: 'recursive' + - name: Free Disk Space + run: ./ci/free_disk_space.sh - name: Install Conan run: | python3 -m pip install pip==25.0.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 317c4f440f..9e02d24d24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,9 @@ Increment the: * [CONFIGURATION] File configuration - console metric exporter [#3734](https://github.com/open-telemetry/opentelemetry-cpp/pull/3734) +* [CI] Free disk space + [#3749](https://github.com/open-telemetry/opentelemetry-cpp/pull/3749) + New Features: * [CONFIGURATION] Implement declarative configuration (config.yaml) diff --git a/ci/free_disk_space.sh b/ci/free_disk_space.sh new file mode 100755 index 0000000000..f83be0dadd --- /dev/null +++ b/ci/free_disk_space.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +# Work around for: +# https://github.com/actions/runner-images/issues/13189 + +# Adapted from: +# https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh + +echo "==============================================================================" +echo "Freeing up disk space on CI system" +echo "==============================================================================" + +# BEFORE: +# Size: 72G +# Used: 53G +# Available: 19G + +df -h +echo "Removing large directories" + +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 + +# AFTER: +# Size: 72G +# Used: 29G +# Available: 44G + +df -h +