Flutter CI/CD No space left on device

When I was trying to integrate Gitlab’s CI/CD pipeline into my flutter project, I came across this error concerning the available space in the VMs used to perform the various jobs.
Is there any way I can solve this problem?

  LLVM ERROR: IO failure on output stream: No space left on device
  clang++: error: unable to execute command: Aborted (core dumped)
  clang++: error: linker command failed due to signal (use -v to see invocation)
  ninja: build stopped: subcommand failed.
  C++ build system [build] failed while executing:
      /opt/android-sdk-linux/cmake/3.22.1/bin/ninja \
        -C \
        /home/mobiledevops/.pub-cache/hosted/pub.dev/rive_common-0.2.8/android/.cxx/Debug/4158v276/x86 \
        rive_text
    from /home/mobiledevops/.pub-cache/hosted/pub.dev/rive_common-0.2.8/android

this is my .gitlab-ci.yml file:

image: mobiledevops/flutter-sdk-image

stages:
  - build


# Build APK
build_release_android:
  stage: build
  before_script:
    - flutter upgrade
    - flutter doctor
  script:
    - flutter pub get
    - flutter pub global activate flutter_launcher_icons
    - export PATH="$PATH:$HOME/.pub-cache/bin"
    - flutter build apk --release
  artifacts:
    paths:
      - build/app/outputs/apk/release/app-release.apk
    expire_in: 1 week


# Build APK
build_debug_android:
  stage: build
  before_script:
    - flutter upgrade
    - flutter doctor
  script:
    - flutter pub get
    - flutter pub global activate flutter_launcher_icons
    - export PATH="$PATH:$HOME/.pub-cache/bin"
    - flutter build apk --debug
  artifacts:
    paths:
      - build/app/outputs/apk/release/app-release.apk
    expire_in: 1 week

Hi,

See here: SaaS runners on Linux | GitLab

looks like you need to use a tag in your gitlab-ci.yml file to use a larger runner. For free users, only small and medium is available. Therefore at best up to 50GB which is shared with the OS on the runner, so could be 40GB available, maybe a little more.

The small runner has only 25GB, so maybe your are attempting to build more than 15-20GB of which is most likely available as max on that runner.