Skip to content

Commit

Permalink
build: increase JavaScript heap memory for CI build (#3394)
Browse files Browse the repository at this point in the history
# Motivation

In PR #3392 we aim to review the chunking strategy of the frontend dapp
which results in an higher consumption of memory when the dapp is build.
As a result, the CI is unable to run few jobs because not enough memory
is allocated within the CI. For example see the result of this job:
https://github.com/dfinity/nns-dapp/actions/runs/6325689226/job/17177726097?pr=3392

To overcome the issue, this PR set a larger memory using the option
[--max-old-space-size](https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes)
provided by NodeJS.

This job for example confirms the solution:
https://github.com/dfinity/nns-dapp/actions/runs/6326554570/job/17180366956?pr=3392

# Notes

The high usage of memory is confirmed by the team of Rollup for example
in this
[comment](rollup/rollup#4243 (comment)).
  • Loading branch information
peterpeterparker authored Sep 27, 2023
1 parent ac818e6 commit fe52cec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test -e frontend/.env || {
###################
# frontend # (output: frontend/public/)
###################
(cd "$TOPLEVEL/frontend" && npm ci && npm run build)
(cd "$TOPLEVEL/frontend" && npm ci && npm run build --node-options="--max-old-space-size=4096")

#################
# assets.tar.xz #
Expand Down

0 comments on commit fe52cec

Please sign in to comment.