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,16 +35,14 @@ 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=6144
40+ build --local_cpu_resources=2
41+ build --jobs=4
42+ startup --host_jvm_args=-Xms512m
43+ startup --host_jvm_args=-Xmx2g
44+ build --discard_analysis_cache
45+ build --nokeep_state_after_build
4846 - run : pnpm install --frozen-lockfile
4947 - run : pnpm run build
5048 - uses : angular/dev-infra/github-actions/previews/pack-and-upload-artifact@0512a5b9381ccff00c278d7b4b6ee38e5c09654d
Original file line number Diff line number Diff line change @@ -27,16 +27,14 @@ 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=6144
32+ build --local_cpu_resources=2
33+ build --jobs=4
34+ startup --host_jvm_args=-Xms512m
35+ startup --host_jvm_args=-Xmx2g
36+ build --discard_analysis_cache
37+ build --nokeep_state_after_build
4038 - run : pnpm install --frozen-lockfile
4139 - run : pnpm run build
4240 - name : Deploy to Firebase Hosting
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=6144
44+ build --local_cpu_resources=2
45+ build --jobs=4
46+ startup --host_jvm_args=-Xms512m
47+ startup --host_jvm_args=-Xmx2g
48+ build --discard_analysis_cache
49+ build --nokeep_state_after_build
4150 - run : pnpm install
4251 - run : pnpm run build
4352 # build-windows:
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