Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/adev-preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ jobs:
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelrc: |
# Print all the options that apply to the build.
# This helps us diagnose which options override others
# (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)
build --announce_rc

# More details on failures
build --verbose_failures=true

# CI supports colors but Bazel does not detect it.
common --color=yes
# Limit resources for CI runners (ubuntu-latest: 7GB RAM, 2 CPUs)
build --local_ram_resources=4096
build --local_cpu_resources=2
build --jobs=2
build --discard_analysis_cache
build --nokeep_state_after_build
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- name: Build
run: pnpm run build
env:
_JAVA_OPTIONS: -Xms512m -Xmx2g
NODE_OPTIONS: --max-old-space-size=4096
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@0512a5b9381ccff00c278d7b4b6ee38e5c09654d
with:
workflow-artifact-name: 'adev-preview'
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/adev-production-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ jobs:
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelrc: |
# Print all the options that apply to the build.
# This helps us diagnose which options override others
# (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)
build --announce_rc

# More details on failures
build --verbose_failures=true

# CI supports colors but Bazel does not detect it.
common --color=yes
# Limit resources for CI runners (ubuntu-latest: 7GB RAM, 2 CPUs)
build --local_ram_resources=4096
build --local_cpu_resources=2
build --jobs=2
build --discard_analysis_cache
build --nokeep_state_after_build
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- name: Build
run: pnpm run build
env:
_JAVA_OPTIONS: -Xms512m -Xmx2g
NODE_OPTIONS: --max-old-space-size=4096
- name: Deploy to Firebase Hosting
uses: FirebaseExtended/action-hosting-deploy@0cbcac4740c2bfb00d632f0b863b57713124eb5a # v0.9.0
with:
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,19 @@ jobs:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelrc: |
# Limit resources for CI runners (ubuntu-latest: 7GB RAM, 2 CPUs)
build --local_ram_resources=4096
build --local_cpu_resources=2
build --jobs=2
build --discard_analysis_cache
build --nokeep_state_after_build
- run: pnpm install
- run: pnpm run build
- name: Build
run: pnpm run build
env:
_JAVA_OPTIONS: -Xms512m -Xmx2g
NODE_OPTIONS: --max-old-space-size=4096
# build-windows:
# runs-on: windows-latest
# steps:
Expand Down
11 changes: 10 additions & 1 deletion tools/lib/adev.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { consola } from 'consola';
import { $ } from 'execa';
import { buildDir } from './workspace';
import { existsSync } from 'node:fs';
import { buildDir, buildOutputDir } from './workspace';

const $$ = $({
stdin: 'inherit',
Expand All @@ -13,6 +14,14 @@ export async function buildAdev() {
const sh = $$({ cwd: buildDir });
await sh`pnpm install --frozen-lockfile`;
await sh`pnpm bazel build //adev:build.production --config=release`;

// Verify build output exists - Bazel may exit with code 0 even when interrupted
if (!existsSync(buildOutputDir)) {
throw new Error(
`Build output directory not found: ${buildOutputDir}\n` +
'Bazel build may have been interrupted or failed silently.'
);
}
}

export function serveAdev() {
Expand Down