mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-13 18:32:12 +03:00
The hosted 7 GB runner cannot build release/v3.8.51 in any profile: `Build App` (build.yml, push on every branch, full `build:release`) died in 19 of the last 30 runs — the branch tip included — with "The runner has received a shutdown signal" ~8 min into `next build`, swapfile and all; the advisory quality.yml build failed on 8/8 recent fork PRs with the same recipe; and `DAST smoke (PR)`'s backend-only build died ~7 min in before the server even started, hidden as a permanently red continue-on-error check. Together they painted every PR into release/** red with zero signal and, on build.yml, produced an artefact nothing downloads. - build.yml: workflow_dispatch only. The bundle is validated where a build fits — ci.yml `Build` on the self-hosted omni-build pool after every merge to main, and nightly-release-green.yml on the same pool for release/**. - dast-smoke.yml: pull_request into main only (plus workflow_dispatch to smoke a release branch by hand); main's tree still builds on the hosted runner in ~5.5 min. - quality.yml: the fork-only rationale of `Build (advisory)` updated to say why own-origin PRs no longer get a hosted build either. Behaviour unchanged. check:workflows --ratchet: 194 zizmor findings, baseline 194. check-workflows and backend-only-smoke-workflows suites pass. Trade-off stated in the PR: own-origin PRs into release/** lose a pre-merge build that was not succeeding anyway; the nightly rail files a base-red issue within a day if a merge breaks the build.
65 lines
2.0 KiB
YAML
65 lines
2.0 KiB
YAML
name: Build App
|
|
|
|
# Manual-only since #11946. The hosted 7 GB runner can no longer build this tree — 19 of
|
|
# the last 30 runs died with "The runner has received a shutdown signal" (VM out of
|
|
# memory) ~8 min into `next build`, release/v3.8.51 itself included, even with the 10 GB
|
|
# swapfile below. Triggered on `push: branches: ["**"]` it painted every branch and every
|
|
# PR red while producing an artefact nothing downloads. The bundle is validated where a
|
|
# build actually fits:
|
|
# - main: ci.yml `Build` (self-hosted omni-build pool) on every merge
|
|
# - release/**: nightly-release-green.yml (same pool, continuous)
|
|
# Dispatch this workflow by hand when a hosted build artefact is genuinely needed.
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
name: Fast Production Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Expand Virtual Memory (Native 10GB Swap)
|
|
run: |
|
|
sudo swapoff -a || true
|
|
sudo rm -f /mnt/swapfile /swapfile
|
|
sudo fallocate -l 10G /mnt/swapfile || sudo dd if=/dev/zero of=/mnt/swapfile bs=1M count=10240
|
|
sudo chmod 600 /mnt/swapfile
|
|
sudo mkswap /mnt/swapfile
|
|
sudo swapon /mnt/swapfile
|
|
free -h
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: "24"
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build Next.js app & CLI bundle
|
|
run: |
|
|
npm run build:release
|
|
env:
|
|
NODE_OPTIONS: "--max-old-space-size=12288"
|
|
OMNIROUTE_BUILD_MEMORY_MB: "12288"
|
|
OMNIROUTE_USE_TURBOPACK: "1"
|
|
|
|
- name: Archive build outputs
|
|
run: |
|
|
tar -czf omniroute-build.tar.gz .build dist
|
|
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: omniroute-build
|
|
path: omniroute-build.tar.gz
|
|
retention-days: 7
|