Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/actions/maximize-build-space/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Maximize Build Space"
description: "Remove large artifacts to maximize available build space on GitHub Actions runners."
runs:
using: "composite"
steps:
- name: Clean
shell: bash
run: |
echo "Available storage before:"
sudo df -h
echo

echo "Removing Removes .NET runtime and libraries..."
sudo rm -rf /usr/share/dotnet

echo "Removing Android SDKs and Tools..."
sudo rm -rf /usr/local/lib/android

echo "Removing GHC (Haskell) artifacts..."
sudo rm -rf /opt/ghc

echo "Removing CodeQL Action Bundles..."
sudo rm -rf /opt/hostedtoolcache/CodeQL

echo "Removing cached Docker images..."
sudo docker image prune --all --force

echo "Available storage after:"
sudo df -h
echo
19 changes: 4 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,12 @@ jobs:
architecture: aarch64

steps:
- name: Clean
uses: easimon/maximize-build-space@v10
with:
# Reserve some space on the / partition to install the needed org.gnome runtimes and their Debug extensions.
# This probably needs around 10-12GB, the rest of the free space on / then gets assigned to the build directory
# where we need the most space
root-reserve-mb: 16000
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'

- name: Checkout
uses: actions/checkout@v4

- name: Clean
uses: ./.github/actions/maximize-build-space

- name: Setup
run: |
sudo apt update
Expand All @@ -61,7 +50,7 @@ jobs:
DISPLAY: "0:0"
run: |
meson setup build --cross-file="architectures/${{ matrix.configuration.architecture }}.crossfile"
sudo xvfb-run --auto-servernum flatpak-builder --arch=${{ matrix.configuration.architecture }} --disable-rofiles-fuse --keep-build-dirs --install-deps-from=flathub --ccache --repo=elementary builddir ./build/io.elementary.Sdk.json
sudo xvfb-run --auto-servernum flatpak-builder --arch=${{ matrix.configuration.architecture }} --disable-rofiles-fuse --keep-build-dirs --install-deps-from=flathub --ccache --repo=elementary /mnt/builddir --state-dir=/mnt/.flatpak-builder ./build/io.elementary.Sdk.json
Comment thread
davidmhewitt marked this conversation as resolved.

- name: Fix Permissions
run: sudo chown -R runner:docker .
19 changes: 4 additions & 15 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,12 @@ jobs:
architecture: aarch64

steps:
- name: Clean
uses: easimon/maximize-build-space@v10
with:
# Reserve some space on the / partition to install the needed org.gnome runtimes and their Debug extensions.
# This probably needs around 10-12GB, the rest of the free space on / then gets assigned to the build directory
# where we need the most space
root-reserve-mb: 16000
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'

- name: Checkout
uses: actions/checkout@v4

- name: Clean
uses: ./.github/actions/maximize-build-space

- name: Setup
run: |
sudo apt update
Expand All @@ -63,7 +52,7 @@ jobs:
DISPLAY: "0:0"
run: |
meson setup build -Dbranch=daily --cross-file="architectures/${{ matrix.configuration.architecture }}.crossfile"
sudo xvfb-run --auto-servernum flatpak-builder --arch=${{ matrix.configuration.architecture }} --default-branch=daily --disable-rofiles-fuse --keep-build-dirs --install-deps-from=flathub --ccache --repo=elementary builddir ./build/io.elementary.Sdk.json
sudo xvfb-run --auto-servernum flatpak-builder --arch=${{ matrix.configuration.architecture }} --default-branch=daily --disable-rofiles-fuse --keep-build-dirs --install-deps-from=flathub --ccache --repo=elementary /mnt/builddir --state-dir=/mnt/.flatpak-builder ./build/io.elementary.Sdk.json

- name: Fix Permissions
run: sudo chown -R runner:docker .
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,11 @@ jobs:
if: github.event.pull_request.merged == true && true == contains(join(github.event.pull_request.labels.*.name), 'Release')

steps:
- name: Clean
uses: easimon/maximize-build-space@v10
with:
# Reserve some space on the / partition to install the needed org.gnome runtimes and their Debug extensions.
# This probably needs around 10-12GB, the rest of the free space on / then gets assigned to the build directory
# where we need the most space
root-reserve-mb: 16000
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'

- name: Checkout
uses: actions/checkout@v4

- name: Clean
uses: ./.github/actions/maximize-build-space

- name: Setup
run: |
Expand All @@ -66,7 +55,7 @@ jobs:
DISPLAY: "0:0"
run: |
meson setup build -Dbranch=${RUNTIME_VERSION} --cross-file="architectures/${{ matrix.configuration.architecture }}.crossfile"
sudo xvfb-run --auto-servernum flatpak-builder --arch=${{ matrix.configuration.architecture }} --default-branch="${RUNTIME_VERSION}" --disable-rofiles-fuse --keep-build-dirs --install-deps-from=flathub --ccache --repo=elementary builddir ./build/io.elementary.Sdk.json
sudo xvfb-run --auto-servernum flatpak-builder --arch=${{ matrix.configuration.architecture }} --default-branch="${RUNTIME_VERSION}" --disable-rofiles-fuse --keep-build-dirs --install-deps-from=flathub --ccache --repo=elementary /mnt/builddir --state-dir=/mnt/.flatpak-builder ./build/io.elementary.Sdk.json

- name: Fix Permissions
run: sudo chown -R runner:docker .
Expand Down