From fbdb51f758f63348b46a4afdb649239b50b560dd Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Tue, 13 Oct 2026 12:59:18 -0700 Subject: [PATCH] ci(e2e): skip the duplicate type pass and source maps in the mobile build --- .github/workflows/checks.yml | 9 +++++++-- apps/sim/lib/core/config/env.ts | 1 + apps/sim/next.config.ts | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ffb2efdda87..f2229dd3702 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -890,14 +890,19 @@ jobs: AWS_REGION: 'us-west-2' ENCRYPTION_KEY: '0000000000000000000000000000000000000000000000000000000000000000' # dummy key for CI only TURBO_CACHE_DIR: .turbo + # This build is on the e2e-mobile critical path; its ~30 s TypeScript pass repeats what + # lint's type-check and the `build` job's own `next build` (generated route types too) + # already enforce. + NEXT_BUILD_SKIP_TYPE_CHECK: 'true' run: bunx turbo run build --filter=@sim/app # Everything `next start` reads; node_modules and the source tree come from e2e-mobile's own - # checkout and setup, at the same workspace path and lockfile. + # checkout and setup, at the same workspace path and lockfile. Source maps are over half the + # build and only serve stack traces and devtools, which the suite never reads. - name: Package the build for e2e-mobile run: >- tar -I 'zstd -T0' -cf "$RUNNER_TEMP/next-build.tar.zst" -C apps/sim - --exclude .next/cache --exclude .next/trace .next + --exclude .next/cache --exclude .next/trace --exclude '*.map' .next # Already zstd-compressed, so stored without zip compression. `overwrite` lets a re-run of # this job replace the earlier attempt's build; three days covers re-running a failed shard diff --git a/apps/sim/lib/core/config/env.ts b/apps/sim/lib/core/config/env.ts index 9405d5d435f..3a5e3447626 100644 --- a/apps/sim/lib/core/config/env.ts +++ b/apps/sim/lib/core/config/env.ts @@ -333,6 +333,7 @@ export const env = createEnv({ // Infrastructure & Deployment NEXT_RUNTIME: z.string().optional(), // Next.js runtime environment DOCKER_BUILD: z.boolean().optional(), // Flag indicating Docker build environment + NEXT_BUILD_SKIP_TYPE_CHECK: z.boolean().optional(), // Skips `next build`'s TypeScript pass where another CI job type-checks // Background Jobs & Scheduling TRIGGER_PROJECT_ID: z.string().optional(), // Trigger.dev project ID diff --git a/apps/sim/next.config.ts b/apps/sim/next.config.ts index 6d9b2a3a0fe..50a03623d4c 100644 --- a/apps/sim/next.config.ts +++ b/apps/sim/next.config.ts @@ -89,7 +89,7 @@ const nextConfig: NextConfig = { ], }, typescript: { - ignoreBuildErrors: isTruthy(env.DOCKER_BUILD), + ignoreBuildErrors: isTruthy(env.DOCKER_BUILD) || isTruthy(env.NEXT_BUILD_SKIP_TYPE_CHECK), }, output: isTruthy(env.DOCKER_BUILD) ? 'standalone' : undefined, serverExternalPackages: [