Limit build jobs on small systems

This commit is contained in:
Nicolas Werner 2022-12-28 22:26:33 +01:00
parent 34203b5349
commit 6176ce7c2b
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -204,9 +204,10 @@ build-flatpak-arm64:
- flatpak --noninteractive install --user flathub org.kde.Sdk//5.15-22.08 - flatpak --noninteractive install --user flathub org.kde.Sdk//5.15-22.08
script: script:
- export VERSION=$(git describe) - export VERSION=$(git describe)
- if [ "$(grep MemTotal /proc/meminfo | tr -cd '[0-9]')" -lt "6000000" ]; then export EXTRA_FLAGS='--jobs=3'; fi
- mkdir -p build-flatpak - mkdir -p build-flatpak
- cd build-flatpak - cd build-flatpak
- flatpak-builder --user --disable-rofiles-fuse --ccache --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date` for arm64" app ../io.github.NhekoReborn.Nheko.yaml - flatpak-builder --user --disable-rofiles-fuse --ccache $EXTRA_FLAGS --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date` for arm64" app ../io.github.NhekoReborn.Nheko.yaml
- flatpak build-bundle repo nheko-arm64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_} - flatpak build-bundle repo nheko-arm64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_}
after_script: after_script:
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true - (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true