Skip to content

Commit

Permalink
[CI] Reuse cleanup script (mlrun#2819)
Browse files Browse the repository at this point in the history
  • Loading branch information
liranbg authored Dec 26, 2022
1 parent c02789f commit 20c76da
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 65 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ jobs:
steps:
- uses: actions/checkout@v3

# since github-actions gives us 14G only, and fills it up with some garbage
# we will free up some space for our build process
# since github-actions gives us 14G only, and fills it up with some garbage
- name: Freeing up disk space
run: |
"${GITHUB_WORKSPACE}/hack/ci/free-space.sh"
"${GITHUB_WORKSPACE}/automation/scripts/github_workflow_free_space.sh"
- name: Install curl and jq
run: sudo apt-get install curl jq
- name: Extract git hash, ref and latest version
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/system-tests-opensource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ jobs:
-r dockerfiles/mlrun-api/requirements.txt -r extras-requirements.txt && pip install -e .
# since github-actions gives us 14G only, and fills it up with some garbage
# we will free up some space for us (~2GB)
- name: Freeing up disk space
run: |
chmod +x "${GITHUB_WORKSPACE}/automation/scripts/github_workflow_free_space.sh"
"${GITHUB_WORKSPACE}/automation/scripts/github_workflow_free_space.sh"
# TODO: How can we avoid these duplicate lines from the enterprise system tests, up until line 120.
Expand Down
23 changes: 19 additions & 4 deletions automation/scripts/github_workflow_free_space.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,31 @@ print_free_space() {
print_free_space

# clean unneeded os packages and misc
sudo apt-get remove --yes '^dotnet-.*' 'php.*' azure-cli google-cloud-sdk google-chrome-stable firefox powershell
sudo apt-get remove -y '^ghc-8.*'
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y \
azure-cli \
google-cloud-sdk \
google-chrome-stable \
firefox \
powershell \
monodoc-http \
mono-devel

sudo apt-get autoremove --yes
sudo apt clean

# cleanup unneeded share dirs ~25GB
# cleanup unneeded share dirs ~30GB
sudo rm --recursive --force \
/usr/local/lib/android \
/usr/share/dotnet \
/usr/share/dotnet \
/usr/share/swift
/usr/share/miniconda \
/usr/share/swift \
/opt/ghc \
/usr/local/share/boost \
"$AGENT_TOOLSDIRECTORY"

# clean unneeded docker images
docker system prune --all --force
Expand Down
3 changes: 2 additions & 1 deletion automation/scripts/pypi_release_waiter.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# Copyright 2018 Iguazio
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
#!/bin/bash

set -e

version=$1
Expand Down
55 changes: 0 additions & 55 deletions hack/ci/free-space.sh

This file was deleted.

0 comments on commit 20c76da

Please sign in to comment.