Skip to content

Commit

Permalink
free up disk space in GHA runner environment (#1698)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe authored Jul 15, 2022
1 parent e6825c4 commit 2da1f91
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/jobs/free_disk_space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /bin/bash

echo Checking disk usage before cleanup
df -h

printf "\nRemoving files as suggested by https://github.com/actions/virtual-environments/issues/2840"

sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

printf "\nChecking disk usage after cleanup"
df -h
2 changes: 1 addition & 1 deletion .github/jobs/get_metviewer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ docker ps -a

# commands to run inside METviewer container
cmd="mysql -hmysql_mv -uroot -pmvuser -e\"create database mv_metplus_test;\";"
cmd+="mysql -hmysql_mv -uroot -pmvuser mv_metplus_test < /METviewer/sql/mv_mysql.sql"
cmd+="mysql -hmysql_mv -uroot -pmvuser mv_metplus_test < /METviewer-python/METdataio/METdbLoad/sql/mv_mysql.sql"
cmd+=";mysql -hmysql_mv -uroot -pmvuser -e\"show databases;\""

# execute commands inside metviewer container to create database
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ jobs:

- uses: actions/checkout@v2

- name: Free disk space
run: .github/jobs/free_disk_space.sh

- name: Create directories for database
run: .github/jobs/create_dirs_for_database.sh

Expand Down

0 comments on commit 2da1f91

Please sign in to comment.