File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,18 +35,18 @@ jobs:
3535 disk-cache : ${{ github.workflow }}
3636 repository-cache : true
3737 bazelrc : |
38- # Print all the options that apply to the build.
39- # This helps us diagnose which options override others
40- # (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)
41- build --announce_rc
42-
43- # More details on failures
44- build --verbose_failures=true
45-
46- # CI supports colors but Bazel does not detect it.
47- common --color=yes
38+ # Limit resources for CI runners (ubuntu-latest: 7GB RAM, 2 CPUs)
39+ build --local_ram_resources=4096
40+ build --local_cpu_resources=2
41+ build --jobs=2
42+ build --discard_analysis_cache
43+ build --nokeep_state_after_build
4844 - run : pnpm install --frozen-lockfile
49- - 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
5050 - uses : angular/dev-infra/github-actions/previews/pack-and-upload-artifact@0512a5b9381ccff00c278d7b4b6ee38e5c09654d
5151 with :
5252 workflow-artifact-name : ' adev-preview'
Original file line number Diff line number Diff line change @@ -27,18 +27,18 @@ jobs:
2727 disk-cache : ${{ github.workflow }}
2828 repository-cache : true
2929 bazelrc : |
30- # Print all the options that apply to the build.
31- # This helps us diagnose which options override others
32- # (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)
33- build --announce_rc
34-
35- # More details on failures
36- build --verbose_failures=true
37-
38- # CI supports colors but Bazel does not detect it.
39- common --color=yes
30+ # Limit resources for CI runners (ubuntu-latest: 7GB RAM, 2 CPUs)
31+ build --local_ram_resources=4096
32+ build --local_cpu_resources=2
33+ build --jobs=2
34+ build --discard_analysis_cache
35+ build --nokeep_state_after_build
4036 - run : pnpm install --frozen-lockfile
41- - 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
4242 - name : Deploy to Firebase Hosting
4343 uses : FirebaseExtended/action-hosting-deploy@0cbcac4740c2bfb00d632f0b863b57713124eb5a # v0.9.0
4444 with :
Original file line number Diff line number Diff line change 3838 bazelisk-cache : true
3939 disk-cache : ${{ github.workflow }}
4040 repository-cache : true
41+ bazelrc : |
42+ # Limit resources for CI runners (ubuntu-latest: 7GB RAM, 2 CPUs)
43+ build --local_ram_resources=4096
44+ build --local_cpu_resources=2
45+ build --jobs=2
46+ build --discard_analysis_cache
47+ build --nokeep_state_after_build
4148 - run : pnpm install
42- - 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
4354 # build-windows:
4455 # runs-on: windows-latest
4556 # steps:
Original file line number Diff line number Diff line change 11import { consola } from 'consola' ;
22import { $ } from 'execa' ;
3- import { buildDir } from './workspace' ;
3+ import { existsSync } from 'node:fs' ;
4+ import { buildDir , buildOutputDir } from './workspace' ;
45
56const $$ = $ ( {
67 stdin : 'inherit' ,
@@ -13,6 +14,14 @@ export async function buildAdev() {
1314 const sh = $$ ( { cwd : buildDir } ) ;
1415 await sh `pnpm install --frozen-lockfile` ;
1516 await sh `pnpm bazel build //adev:build.production --config=release` ;
17+
18+ // Verify build output exists - Bazel may exit with code 0 even when interrupted
19+ if ( ! existsSync ( buildOutputDir ) ) {
20+ throw new Error (
21+ `Build output directory not found: ${ buildOutputDir } \n` +
22+ 'Bazel build may have been interrupted or failed silently.'
23+ ) ;
24+ }
1625}
1726
1827export function serveAdev ( ) {
You can’t perform that action at this time.
0 commit comments