More optimizations are needed.
Some checks failed
Tests / Build and Push CICD Image (push) Failing after 6m43s
Tests / TypeScript Type Check (push) Has been skipped
Tests / End of File Check (push) Has been skipped
Tests / TSDoc Lint Check (push) Has been skipped
Tests / Backend Tests (push) Has been skipped
Tests / YAML Syntax Check (push) Has been skipped
Tests / TOML Syntax Check (push) Has been skipped
Tests / No Docstring Types Check (push) Has been skipped
Tests / ESLint Check (push) Has been skipped
Tests / Prettier Format Check (push) Has been skipped
Tests / Trailing Whitespace Check (push) Has been skipped
Tests / Mixed Line Ending Check (push) Has been skipped
Tests / TOML Formatting Check (push) Has been skipped
Tests / Ruff Linting (push) Has been skipped
Tests / Ruff Format Check (push) Has been skipped
Tests / Pyright Type Check (push) Has been skipped
Tests / Darglint Docstring Check (push) Has been skipped
Tests / Frontend Tests (push) Has been skipped
Tests / Backend Doctests (push) Has been skipped
Tests / Integration Tests (push) Has been skipped
Tests / End-to-End Tests (push) Has been skipped

Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
2025-10-29 11:24:58 -04:00
parent 4f92e261c1
commit 53e500492f

View File

@@ -145,26 +145,33 @@ RUN dd if=/dev/zero of=/tmp/swapfile bs=1M count=1024 2>/dev/null && \
mkswap /tmp/swapfile && \
swapon /tmp/swapfile || echo "Swap setup failed, continuing without swap"
# Configure Yarn for CI environment with memory optimizations
RUN echo "# CI optimizations" >> .yarnrc.yml && \
echo "httpTimeout: 60000" >> .yarnrc.yml && \
# Configure Yarn for extreme memory constraints (ARM64)
RUN echo "# CI optimizations for ARM64 memory constraints" >> .yarnrc.yml && \
echo "httpTimeout: 120000" >> .yarnrc.yml && \
echo "enableGlobalCache: false" >> .yarnrc.yml && \
echo "compressionLevel: 0" >> .yarnrc.yml && \
echo "nmMode: hardlinks-local" >> .yarnrc.yml && \
echo "httpRetry: 3" >> .yarnrc.yml && \
echo "networkConcurrency: 2" >> .yarnrc.yml
echo "httpRetry: 5" >> .yarnrc.yml && \
echo "networkConcurrency: 1" >> .yarnrc.yml && \
echo "enableScripts: false" >> .yarnrc.yml && \
echo "preferDeferredVersions: true" >> .yarnrc.yml
# Install frontend dependencies with aggressive memory management
RUN export NODE_OPTIONS="--max-old-space-size=1536 --max-semi-space-size=128" && \
ulimit -v 2097152 2>/dev/null || true && \
# Install frontend dependencies with extreme memory constraints for ARM64
RUN export NODE_OPTIONS="--max-old-space-size=512 --max-semi-space-size=64 --initial-old-space-size=128 --optimize-for-size" && \
export UV_WORKERS=1 && \
ulimit -v 1048576 2>/dev/null || true && \
echo "Memory info before install:" && \
free -h || true && \
for i in 1 2 3; do \
echo "Attempt $i: Installing frontend dependencies..." && \
timeout 1800 yarn install --immutable \
echo "Attempt $i: Installing frontend dependencies with minimal memory..." && \
sync && echo 3 > /proc/sys/vm/drop_caches 2>/dev/null || true && \
timeout 3600 yarn install --immutable --mode=skip-build \
&& break || \
(echo "Attempt $i failed, cleaning up and retrying..." && \
(echo "Attempt $i failed, cleaning up and waiting for memory recovery..." && \
rm -rf node_modules .yarn/cache .yarn/install-state.gz && \
yarn cache clean --all 2>/dev/null || true && \
sleep 30); \
sync && echo 3 > /proc/sys/vm/drop_caches 2>/dev/null || true && \
sleep 60); \
done && \
rm -rf .yarn/cache && \
swapoff /tmp/swapfile 2>/dev/null || true && \