Skip to content
Closed
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
40 changes: 3 additions & 37 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -970,9 +970,6 @@ jobs:
if: needs.changes.outputs.e2e_build == 'true'
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-16vcpu-ubuntu-2404' || 'linux-x64-8-core' }}
timeout-minutes: 25
env:
NEXT_BUILD_PERSISTENT_CACHE: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && (github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork) && 'true' || 'false' }}

steps:
- *checkout-mirror
- *checkout-plain
Expand All @@ -991,10 +988,8 @@ jobs:
echo "::warning::Runner has ${TOTAL_GB} GB. A cold-cache build peaks ~51 GB, so this run may be OOM-killed (reported only as 'the runner has received a shutdown signal'). Warm/partial builds should still fit."
fi

- name: Plan incremental compiler state
id: compiler-cache-plan
if: env.NEXT_BUILD_PERSISTENT_CACHE == 'true'
env: &e2e-build-env
- name: Build application
env:
NODE_OPTIONS: '--no-warnings --max-old-space-size=8192'
NEXT_PUBLIC_APP_URL: 'http://localhost:3000'
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio'
Expand All @@ -1009,38 +1004,9 @@ jobs:
# already enforce.
NEXT_BUILD_SKIP_TYPE_CHECK: 'true'
NEXT_BUILD_SKIP_SOURCE_MAPS: 'true'
run: |
echo "toolchain=bun$(bun --version)-node$(node --version)" >> "$GITHUB_OUTPUT"
if bunx turbo run build --filter=@sim/app --dry=json > "$RUNNER_TEMP/e2e-build-plan.json" &&
jq -e 'type == "object" and (.tasks | type) == "array" and ([.tasks[] | select(.taskId == "@sim/app#build")] | length == 1 and .[0].cache.status == "HIT")' "$RUNNER_TEMP/e2e-build-plan.json" > /dev/null; then
echo 'restore=false' >> "$GITHUB_OUTPUT"
else
echo 'restore=true' >> "$GITHUB_OUTPUT"
fi

- name: Mount incremental compiler state
id: compiler-cache
if: steps.compiler-cache-plan.outputs.restore == 'true'
uses: ./.github/actions/cache
with:
provider: ${{ vars.CI_PROVIDER }}
key: ${{ github.repository }}-next-build-e2e-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.event_name }}-${{ steps.compiler-cache-plan.outputs.toolchain }}-${{ hashFiles('bun.lock', 'package.json', 'patches/**', 'apps/sim/package.json', 'apps/sim/next.config.ts', 'apps/sim/lib/core/config/env.ts', '.github/workflows/checks.yml', '.github/actions/setup/action.yml') }}
path: ./apps/sim/.next/cache

- name: Bound restored compiler state
if: steps.compiler-cache.outcome == 'success'
working-directory: apps/sim
run: node ../../scripts/prune-turbopack-cache.mts --build

- name: Build application
env: *e2e-build-env
TURBO_FORCE: 'true'
run: bunx turbo run build --filter=@sim/app

- name: Bound compiler state before persistence
if: always() && !cancelled() && steps.compiler-cache.outcome == 'success'
working-directory: apps/sim
run: node ../../scripts/prune-turbopack-cache.mts --build

# Everything `next start` reads, including the spreadsheet parse worker it spawns (named, so a
# missing bundle fails packaging as it fails docker/app.Dockerfile); node_modules and the source
# tree come from e2e-production's own checkout and setup, at the same workspace path and
Expand Down
Loading