update(flatpak): default local builds to 2 jobs

This commit is contained in:
vii committed 2026-09-29 23:25:03 -05:00
1 parent 26767e925c
commit eca5f395eb
4 files changed
+13 -4

No files matched your search

+7
View File
@@ -45,6 +45,13 @@ GitHub are taken from the matching section here.
`MOCKTAIL_LOCAL_STORAGE_CURRENT_USER_ID` is now ignored instead of being
partly read.
### Changed
- `make flatpak` and `scripts/build_flatpak.sh` now build with 2 jobs by
default instead of 4, so a local Flatpak build is less likely to run out
of memory. Set `FLATPAK_JOBS` or `MOCKTAIL_FLATPAK_JOBS` to use more.
Thanks to @glook9001.
## [0.3.1] - 2026-09-20
### Added
+1 -1
View File
@@ -21,7 +21,7 @@ ANYLINUX_APPIMAGETOOL ?= appimagetool
PREFIX ?= /usr
FLATPAK_BUILD_DIR ?= build-flatpak
FLATPAK_MANIFEST ?= packaging/flatpak/io.github.CoderDayton.nightcap.json
FLATPAK_JOBS ?= 4
FLATPAK_JOBS ?= 2
define build_native_runtime
@git submodule update --init --recursive
+2 -2
View File
@@ -10,7 +10,7 @@ readonly PROJECT_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd -P)"
BUILD_DIR="${PROJECT_ROOT}/build-flatpak"
MANIFEST="${PROJECT_ROOT}/packaging/flatpak/io.github.CoderDayton.nightcap.json"
JOBS="${MOCKTAIL_FLATPAK_JOBS:-4}"
JOBS="${MOCKTAIL_FLATPAK_JOBS:-2}"
Usage() {
cat <<'EOF'
@@ -21,7 +21,7 @@ Build and install Mocktail as a per-user Flatpak for the host architecture.
Options:
--build-dir DIR Builder output directory (default: build-flatpak).
--manifest FILE Flatpak manifest path.
--jobs N Maximum parallel build jobs (default: 4).
--jobs N Maximum parallel build jobs (default: 2).
-h, --help Show this help.
EOF
}
+3 -1
View File
@@ -176,8 +176,10 @@ grep -Fq './scripts/build_flatpak.sh' <<<"${dry_run}" ||
Fail 'make flatpak does not invoke the guarded Flatpak builder'
grep -Fq -- '--manifest packaging/flatpak/io.github.CoderDayton.nightcap.json' \
<<<"${dry_run}" || Fail 'make flatpak lost the canonical manifest'
grep -Fq -- '--jobs 4' <<<"${dry_run}" ||
grep -Fq -- '--jobs 2' <<<"${dry_run}" ||
Fail 'make flatpak does not cap local build parallelism'
grep -Fq 'JOBS="${MOCKTAIL_FLATPAK_JOBS:-2}"' "${BUILD_HELPER}" ||
Fail 'Flatpak helper does not cap local build parallelism'
mkdir -p -- "${TEMP_DIR}/bin"
cat >"${TEMP_DIR}/bin/uname" <<'EOF'