Skip to content

Commit aac3045

Browse files
authored
Merge pull request #72 from MAGICGrants/actions-runner-space-fix
Free up actions runner space
2 parents cb4e33a + 37eb6cf commit aac3045

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ jobs:
2929
environment: Release
3030
needs: version
3131
steps:
32+
- name: Free up disk space
33+
run: |
34+
sudo rm -rf /usr/share/dotnet
35+
sudo rm -rf /usr/local/lib/android
36+
sudo rm -rf /opt/ghc
37+
sudo rm -rf /opt/hostedtoolcache/CodeQL
38+
sudo docker image prune -af
39+
df -h
40+
3241
- name: Checkout repository
3342
uses: actions/checkout@v4
3443
with:

Dockerfile.builder

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN apt-get update && \
2727
libgtk-3-dev=3.24.24-4+deb11u4 \
2828
liblzma-dev=5.2.5-2.1~deb11u1 \
2929
libstdc++-10-dev=10.2.1-6 \
30-
openjdk-17-jdk=17.0.17+10-1~deb11u1 \
30+
openjdk-17-jdk-headless=17.0.17+10-1~deb11u1 \
3131
ca-certificates=20210119 \
3232
build-essential=12.9 \
3333
make=4.3-4.1 \
@@ -38,7 +38,7 @@ RUN apt-get update && \
3838
file=1:5.39-3+deb11u1 \
3939
fakeroot=1.25.3-1.1 && \
4040
apt-get clean && \
41-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
41+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* /usr/share/man/*
4242

4343
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-${TARGETARCH}
4444
ENV ANDROID_HOME=/opt/android-sdk
@@ -68,7 +68,11 @@ RUN yes | sdkmanager --licenses && \
6868
"platforms;android-${ANDROID_PLATFORM_VERSION}" \
6969
"build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
7070
"ndk;${ANDROID_NDK_VERSION}" && \
71-
rm -rf ${ANDROID_HOME}/.android/cache
71+
rm -rf ${ANDROID_HOME}/.android/cache && \
72+
rm -rf ${ANDROID_HOME}/ndk/*/sources/third_party/shaderc && \
73+
rm -rf ${ANDROID_HOME}/ndk/*/sources/cxx-stl/llvm-libc++/test && \
74+
rm -rf ${ANDROID_HOME}/ndk/*/shader-tools && \
75+
rm -rf ${ANDROID_HOME}/ndk/*/simpleperf
7276
7377
# Install Flutter with pinned version
7478
RUN git clone https://github.com/flutter/flutter.git -b ${FLUTTER_VERSION} --depth 1 /flutter && \
@@ -77,6 +81,8 @@ RUN git clone https://github.com/flutter/flutter.git -b ${FLUTTER_VERSION} --dep
7781
flutter config --enable-linux-desktop && \
7882
flutter config --no-analytics && \
7983
flutter precache --linux --android && \
80-
find /flutter -name "*.zip" -delete
84+
find /flutter -name "*.zip" -delete && \
85+
rm -rf /flutter/examples /flutter/dev/devicelab /flutter/dev/benchmarks && \
86+
rm -rf /flutter/.pub-cache/hosted/pub.dev/*/example
8187
8288
WORKDIR /workspace

0 commit comments

Comments
 (0)