[gcc(refs/vendors/microsoft/heads/main)] Refactor and free disk space in update-main too
Eugene Rozenfeld
erozen@gcc.gnu.org
Sat Oct 7 02:26:29 GMT 2023
https://gcc.gnu.org/g:c071825aced2006b8ede3a72d29222a46016d27c
commit c071825aced2006b8ede3a72d29222a46016d27c
Author: Eugene Rozenfeld <erozen@microsoft.com>
Date: Fri Oct 6 19:00:22 2023 -0700
Refactor and free disk space in update-main too
Diff:
---
.github/scripts/free-disk-space.sh | 30 ++++++++++++++++++++++++++++++
.github/workflows/build.yaml | 14 +++++---------
.github/workflows/test-gcc.yaml | 14 +++++---------
.github/workflows/update-main.yaml | 13 ++++++++++++-
4 files changed, 52 insertions(+), 19 deletions(-)
diff --git a/.github/scripts/free-disk-space.sh b/.github/scripts/free-disk-space.sh
new file mode 100644
index 00000000000..8325b954590
--- /dev/null
+++ b/.github/scripts/free-disk-space.sh
@@ -0,0 +1,30 @@
+# Copyright (c) Microsoft Corporation.
+
+# MIT License
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+echo "Free space before:"
+df -h
+sudo rm -rf /usr/share/dotnet
+sudo rm -rf /opt/ghc
+sudo rm -rf /usr/local/share/boost
+sudo rm -rf "$AGENT_TOOLSDIRECTORY"
+echo "Free space after:"
+df -h
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index eb68916cda9..7b95beab24b 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -41,15 +41,6 @@ jobs:
build:
runs-on: ubuntu-22.04
steps:
- - run: |
- echo "Free space before:"
- df -h
- sudo rm -rf /usr/share/dotnet
- sudo rm -rf /opt/ghc
- sudo rm -rf /usr/local/share/boost
- sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- echo "Free space after:"
- df -h
- name: checkout
uses: actions/checkout@v3
with:
@@ -57,6 +48,11 @@ jobs:
submodules: recursive
lfs: true
+ - name: Increase available disk space
+ run: |
+ chmod +x .github/scripts/free-disk-space.sh
+ .github/scripts/free-disk-space.sh
+
- name: Setup Python 3.7
uses: actions/setup-python@v4
with:
diff --git a/.github/workflows/test-gcc.yaml b/.github/workflows/test-gcc.yaml
index 1f1b83f711c..2a7d9c14a47 100644
--- a/.github/workflows/test-gcc.yaml
+++ b/.github/workflows/test-gcc.yaml
@@ -105,15 +105,6 @@ jobs:
fail-fast: false
runs-on: ubuntu-22.04
steps:
- - run: |
- echo "Free space before:"
- df -h
- sudo rm -rf /usr/share/dotnet
- sudo rm -rf /opt/ghc
- sudo rm -rf /usr/local/share/boost
- sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- echo "Free space after:"
- df -h
- run: echo ${{needs.init.outputs.output1}} ${{needs.init.outputs.output2}}
- run: echo $GITHUB_CONTEXT
env:
@@ -125,6 +116,11 @@ jobs:
submodules: recursive
lfs: true
+ - name: Increase available disk space
+ run: |
+ chmod +x .github/scripts/free-disk-space.sh
+ .github/scripts/free-disk-space.sh
+
- name: Setup Python 3.7
uses: actions/setup-python@v4
with:
diff --git a/.github/workflows/update-main.yaml b/.github/workflows/update-main.yaml
index c1e792e299c..91e22d58e50 100644
--- a/.github/workflows/update-main.yaml
+++ b/.github/workflows/update-main.yaml
@@ -52,7 +52,13 @@ jobs:
fetch-depth: 0
submodules: recursive
lfs: true
-
+
+ - name: Increase available disk space
+ run: |
+ chmod +x .github/scripts/free-disk-space.sh
+ .github/scripts/free-disk-space.sh
+
+
- name: Setup Python 3.7
uses: actions/setup-python@v4
with:
@@ -140,6 +146,11 @@ jobs:
submodules: recursive
lfs: true
+ - name: Increase available disk space
+ run: |
+ chmod +x .github/scripts/free-disk-space.sh
+ .github/scripts/free-disk-space.sh
+
- name: Setup Python 3.7
uses: actions/setup-python@v4
with:
More information about the Gcc-cvs
mailing list