Skip to content

Commit 22316dc

Browse files
committed
fix: limit env scope to build step only
- Move _JAVA_OPTIONS and NODE_OPTIONS to build step env - Remove startup options from bazelrc (use _JAVA_OPTIONS instead) - Reduce local_ram_resources to 4096MB - Reduce jobs to 2
1 parent 2dd0f47 commit 22316dc

3 files changed

Lines changed: 21 additions & 15 deletions

File tree

.github/workflows/adev-preview-build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,17 @@ jobs:
3636
repository-cache: true
3737
bazelrc: |
3838
# Limit resources for CI runners (ubuntu-latest: 7GB RAM, 2 CPUs)
39-
build --local_ram_resources=6144
39+
build --local_ram_resources=4096
4040
build --local_cpu_resources=2
41-
build --jobs=4
42-
startup --host_jvm_args=-Xms512m
43-
startup --host_jvm_args=-Xmx2g
41+
build --jobs=2
4442
build --discard_analysis_cache
4543
build --nokeep_state_after_build
4644
- run: pnpm install --frozen-lockfile
47-
- run: pnpm run build
45+
- name: Build
46+
run: pnpm run build
47+
env:
48+
_JAVA_OPTIONS: -Xms512m -Xmx2g
49+
NODE_OPTIONS: --max-old-space-size=4096
4850
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@0512a5b9381ccff00c278d7b4b6ee38e5c09654d
4951
with:
5052
workflow-artifact-name: 'adev-preview'

.github/workflows/adev-production-deploy.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,17 @@ jobs:
2828
repository-cache: true
2929
bazelrc: |
3030
# Limit resources for CI runners (ubuntu-latest: 7GB RAM, 2 CPUs)
31-
build --local_ram_resources=6144
31+
build --local_ram_resources=4096
3232
build --local_cpu_resources=2
33-
build --jobs=4
34-
startup --host_jvm_args=-Xms512m
35-
startup --host_jvm_args=-Xmx2g
33+
build --jobs=2
3634
build --discard_analysis_cache
3735
build --nokeep_state_after_build
3836
- run: pnpm install --frozen-lockfile
39-
- run: pnpm run build
37+
- name: Build
38+
run: pnpm run build
39+
env:
40+
_JAVA_OPTIONS: -Xms512m -Xmx2g
41+
NODE_OPTIONS: --max-old-space-size=4096
4042
- name: Deploy to Firebase Hosting
4143
uses: FirebaseExtended/action-hosting-deploy@0cbcac4740c2bfb00d632f0b863b57713124eb5a # v0.9.0
4244
with:

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,17 @@ jobs:
4040
repository-cache: true
4141
bazelrc: |
4242
# Limit resources for CI runners (ubuntu-latest: 7GB RAM, 2 CPUs)
43-
build --local_ram_resources=6144
43+
build --local_ram_resources=4096
4444
build --local_cpu_resources=2
45-
build --jobs=4
46-
startup --host_jvm_args=-Xms512m
47-
startup --host_jvm_args=-Xmx2g
45+
build --jobs=2
4846
build --discard_analysis_cache
4947
build --nokeep_state_after_build
5048
- run: pnpm install
51-
- run: pnpm run build
49+
- name: Build
50+
run: pnpm run build
51+
env:
52+
_JAVA_OPTIONS: -Xms512m -Xmx2g
53+
NODE_OPTIONS: --max-old-space-size=4096
5254
# build-windows:
5355
# runs-on: windows-latest
5456
# steps:

0 commit comments

Comments
 (0)