Skip to content

Commit

Permalink
Add step to reduce disk space when building docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bloebp committed Oct 6, 2024
1 parent 69075be commit 589dbcf
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 22 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,34 @@ on:

jobs:
docs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container:
image: "ghcr.io/${{ github.repository_owner }}/dowhy-docs-generation:latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2.0.5
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm

# Following https://github.com/marketplace/actions/free-disk-space-ubuntu
- name: Some cleanup for more disk space
run: |
rm -rf /usr/share/dotnet
rm -rf "$AGENT_TOOLSDIRECTORY"
apt-get autoremove -y
apt-get clean
df -h
rm -rf "$AGENT_TOOLSDIRECTORY" || true
rm -rf /usr/local/lib/android || true
rm -rf /opt/ghc || true
rm -rf /usr/local/.ghcup || true
swapoff -a || true
rm -f /mnt/swapfile || true
apt-get remove -y '^aspnetcore-.*' || true
apt-get remove -y '^dotnet-.*' --fix-missing || true
apt-get remove -y 'php.*' --fix-missing || true
apt-get remove -y '^mongodb-.*' --fix-missing || true
apt-get remove -y '^mysql-.*' --fix-missing || true
apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || true
apt-get remove -y google-cloud-sdk --fix-missing || true
apt-get remove -y google-cloud-cli --fix-missing || true
apt-get autoremove -y || true
apt-get clean || true
df -h
- name: Install Python Dependencies
Expand Down
30 changes: 19 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,34 @@ on:

jobs:
docs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container:
image: "ghcr.io/${{ github.repository_owner }}/dowhy-docs-generation:latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2.0.5
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm

# Following https://github.com/marketplace/actions/free-disk-space-ubuntu
- name: Some cleanup for more disk space
run: |
rm -rf /usr/share/dotnet
rm -rf "$AGENT_TOOLSDIRECTORY"
apt-get autoremove -y
apt-get clean
df -h
rm -rf "$AGENT_TOOLSDIRECTORY" || true
rm -rf /usr/local/lib/android || true
rm -rf /opt/ghc || true
rm -rf /usr/local/.ghcup || true
swapoff -a || true
rm -f /mnt/swapfile || true
apt-get remove -y '^aspnetcore-.*' || true
apt-get remove -y '^dotnet-.*' --fix-missing || true
apt-get remove -y 'php.*' --fix-missing || true
apt-get remove -y '^mongodb-.*' --fix-missing || true
apt-get remove -y '^mysql-.*' --fix-missing || true
apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || true
apt-get remove -y google-cloud-sdk --fix-missing || true
apt-get remove -y google-cloud-cli --fix-missing || true
apt-get autoremove -y || true
apt-get clean || true
df -h
- name: Install Python Dependencies
Expand Down

0 comments on commit 589dbcf

Please sign in to comment.