* feat: migrate tooling and runtimes to bun * fix: serialize act installs and adapt backup checks * fix: finish bun scripts and rootless act setup * fix: support bun images in runtime benchmarks * fix: keep a single bun toolchain configuration * fix: include docs mascot sources in workshop build * docs: use bun in remaining tool commands * fix: complete bun sqlite development tooling * docs: explain sqlite development adapter * fix: align remaining commands and local ci validation * fix: use renovate regex fallback with bun * fix: finalize bun sqlite connections during cleanup * fix: preserve sqlite foreign key enforcement * fix: align docker build frontends * fix: prepare release versions with bun * Add Bun benchmarks and preserve SQLite connection defaults * Benchmark Bun installs, conflicts and production workloads * Force Bun workspace tools and HTTP/1.1 upstream streaming * Exclude benchmark evidence from Docker contexts * Expose branch benchmarks through CI * Verify hydrated widget data in production benchmarks * Measure image archives and document benchmark protocol * Audit dependency sharing across every workspace * Pin pnpm for nested baseline benchmark scripts * Preserve nested manager pinning on benchmark resume * Include application and runtime image footprints * Fail benchmark gates on candidate command errors * Report complete build overhead and sampled memory bounds * Validate migration comparisons across pinned revisions * Record configurable runtime memory budgets * Retain out-of-memory kills in runtime budget probes * Reject OOM events consistently across runtime metrics * Record complete Bun migration benchmarks * Record memory diagnosis and correct Turbo caching * Use Bun package management while preserving Node runtimes * Keep native build fallbacks and exclude development artifacts * Fix Node ESM metadata and isolate local CI configuration * Measure development performance and isolate act environment * Support isolated environment files in rootless act * Validate the full migration range with act * Preserve native SQLite binding for bundled migrations * Use documented dev defaults and report benchmark scope * Validate dev defaults and isolate restart measurements * Record package-manager and development benchmarks * Keep benchmark measurements and link full command artifacts * Clean up temporary act environment files * Validate Node runtimes in package-manager comparisons * Validate every workspace in manual CI runs * Retain patched nested brace expansion versions * Complete package-manager and Node performance report * Normalize archived benchmark logs * Record final hosted validation * Cache both Next builds with platform isolation * Prime cache with write-only mode * Split Next artifacts below Cloudflare upload limit * Assemble coherent standalone cache outputs * Preserve traced middleware entrypoints * Assemble traced directory links before files * Separate cached dependencies from assembled output * Record signed Turbo cache benchmarks * Remove archived benchmark captures Full benchmark evidence is preserved at 8f7d3bcd14109bfb13fa664d31710b88d820ad66. * Remove migration benchmark harness * fix: correct migration launch and local Act prerequisites * Consolidate Turbo caches and production artifacts * Exclude generated files from Docker cache inputs * fix: address Bun migration review findings * fix: check restored compiler bundle manifests
248 lines
8.5 KiB
YAML
248 lines
8.5 KiB
YAML
name: Workshop
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/workshop.yml"
|
|
- "tooling/github/**"
|
|
- "apps/workshop/**"
|
|
- "apps/docs/**"
|
|
- "packages/common/**"
|
|
- "packages/core/**"
|
|
- "packages/custom-widgets/**"
|
|
- "packages/definitions/**"
|
|
- "packages/db/**"
|
|
- "packages/server-settings/**"
|
|
- "packages/settings/**"
|
|
- "packages/translation/**"
|
|
- "packages/ui/**"
|
|
- "packages/validation/**"
|
|
- "packages/workshop/**"
|
|
- "tooling/typescript/**"
|
|
- "patches/**"
|
|
- "package.json"
|
|
- "bun.lock"
|
|
- "bunfig.toml"
|
|
- "turbo.json"
|
|
push:
|
|
branches: [dev, v2, release/v2, main]
|
|
paths:
|
|
- ".github/workflows/workshop.yml"
|
|
- "tooling/github/**"
|
|
- "apps/workshop/**"
|
|
- "apps/docs/**"
|
|
- "packages/common/**"
|
|
- "packages/core/**"
|
|
- "packages/custom-widgets/**"
|
|
- "packages/definitions/**"
|
|
- "packages/db/**"
|
|
- "packages/server-settings/**"
|
|
- "packages/settings/**"
|
|
- "packages/translation/**"
|
|
- "packages/ui/**"
|
|
- "packages/validation/**"
|
|
- "packages/workshop/**"
|
|
- "tooling/typescript/**"
|
|
- "patches/**"
|
|
- "package.json"
|
|
- "bun.lock"
|
|
- "bunfig.toml"
|
|
- "turbo.json"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ (github.ref_name == 'v2' || github.ref_name == 'release/v2') && 'v2-preview' || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
production-smoke:
|
|
if: github.event_name == 'pull_request'
|
|
name: Production image smoke (${{ matrix.arch }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- arch: amd64
|
|
runner: ubuntu-24.04
|
|
- arch: arm64
|
|
runner: ubuntu-24.04-arm
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
if: "!env.ACT"
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24.18.0
|
|
- name: Set up Docker Buildx
|
|
if: "!env.ACT"
|
|
uses: docker/setup-buildx-action@v4
|
|
- name: Build the production image
|
|
if: "!env.ACT"
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
context: .
|
|
file: apps/workshop/Dockerfile
|
|
target: production
|
|
platforms: linux/${{ matrix.arch }}
|
|
load: true
|
|
tags: homarr-workshop:smoke
|
|
cache-from: type=gha,scope=workshop-linux-${{ matrix.arch }}
|
|
cache-to: type=gha,scope=workshop-linux-${{ matrix.arch }},mode=max
|
|
secrets: |
|
|
TURBO_API=${{ secrets.TURBO_API }}
|
|
TURBO_TEAM=${{ secrets.TURBO_TEAM }}
|
|
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
|
|
TURBO_REMOTE_CACHE_SIGNATURE_KEY=${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
|
|
- name: Exercise the production image
|
|
if: "!env.ACT"
|
|
env:
|
|
WORKSHOP_IMAGE_TEST_IMAGE: homarr-workshop:smoke
|
|
run: sh apps/workshop/test-image.sh
|
|
- name: Build and exercise the production image with Act
|
|
if: env.ACT
|
|
env:
|
|
TURBO_API: ${{ secrets.TURBO_API }}
|
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
|
|
run: sh apps/workshop/test-image.sh
|
|
|
|
validate:
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
if: "!env.ACT"
|
|
- run: docker compose --env-file apps/workshop/.env.staging.example -f apps/workshop/docker-compose.staging.yml config --quiet
|
|
|
|
publish-amd64:
|
|
if: github.event_name == 'push' && (github.ref_name == 'v2' || github.ref_name == 'release/v2' || github.ref_name == 'main')
|
|
needs: validate
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 20
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
outputs:
|
|
digest: ${{ steps.build.outputs.digest }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
if: "!env.ACT"
|
|
- uses: docker/setup-buildx-action@v4
|
|
- uses: docker/login-action@v4
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: docker/build-push-action@v7
|
|
id: build
|
|
with:
|
|
context: .
|
|
file: apps/workshop/Dockerfile
|
|
target: production
|
|
platforms: linux/amd64
|
|
outputs: type=image,"name=ghcr.io/homarr-labs/workshop",push-by-digest=true,name-canonical=true,push=true
|
|
cache-from: type=gha,scope=workshop-linux-amd64
|
|
cache-to: type=gha,scope=workshop-linux-amd64,mode=max
|
|
secrets: |
|
|
TURBO_API=${{ secrets.TURBO_API }}
|
|
TURBO_TEAM=${{ secrets.TURBO_TEAM }}
|
|
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
|
|
TURBO_REMOTE_CACHE_SIGNATURE_KEY=${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
|
|
|
|
publish-arm64:
|
|
if: github.event_name == 'push' && (github.ref_name == 'v2' || github.ref_name == 'release/v2' || github.ref_name == 'main')
|
|
needs: validate
|
|
runs-on: ubuntu-24.04-arm
|
|
timeout-minutes: 20
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
outputs:
|
|
digest: ${{ steps.build.outputs.digest }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
if: "!env.ACT"
|
|
- uses: docker/setup-buildx-action@v4
|
|
- uses: docker/login-action@v4
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: docker/build-push-action@v7
|
|
id: build
|
|
with:
|
|
context: .
|
|
file: apps/workshop/Dockerfile
|
|
target: production
|
|
platforms: linux/arm64
|
|
outputs: type=image,"name=ghcr.io/homarr-labs/workshop",push-by-digest=true,name-canonical=true,push=true
|
|
cache-from: type=gha,scope=workshop-linux-arm64
|
|
cache-to: type=gha,scope=workshop-linux-arm64,mode=max
|
|
secrets: |
|
|
TURBO_API=${{ secrets.TURBO_API }}
|
|
TURBO_TEAM=${{ secrets.TURBO_TEAM }}
|
|
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
|
|
TURBO_REMOTE_CACHE_SIGNATURE_KEY=${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
|
|
|
|
publish:
|
|
if: github.event_name == 'push' && (github.ref_name == 'v2' || github.ref_name == 'release/v2' || github.ref_name == 'main')
|
|
needs: [publish-amd64, publish-arm64]
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 5
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
env:
|
|
WORKSHOP_IMAGE: ghcr.io/homarr-labs/workshop
|
|
steps:
|
|
- uses: docker/setup-buildx-action@v4
|
|
- uses: docker/login-action@v4
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Verify branch head before publication
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
const branchName = context.ref.replace("refs/heads/", "");
|
|
const { data: branch } = await github.rest.repos.getBranch({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
branch: branchName,
|
|
});
|
|
if (branch.commit.sha !== context.sha) {
|
|
core.setFailed(`Branch ${branchName} moved from ${context.sha} to ${branch.commit.sha}.`);
|
|
}
|
|
- name: Publish multi-platform image
|
|
env:
|
|
AMD64_DIGEST: ${{ needs.publish-amd64.outputs.digest }}
|
|
ARM64_DIGEST: ${{ needs.publish-arm64.outputs.digest }}
|
|
run: |
|
|
tags=(-t "${WORKSHOP_IMAGE}:sha-${GITHUB_SHA}")
|
|
if [[ "${GITHUB_REF_NAME}" == "v2" || "${GITHUB_REF_NAME}" == "release/v2" ]]; then
|
|
tags+=(-t "${WORKSHOP_IMAGE}:v2")
|
|
fi
|
|
if [[ "${GITHUB_REF_NAME}" == "main" ]]; then
|
|
tags+=(-t "${WORKSHOP_IMAGE}:latest")
|
|
fi
|
|
docker buildx imagetools create "${tags[@]}" \
|
|
"${WORKSHOP_IMAGE}@${AMD64_DIGEST}" \
|
|
"${WORKSHOP_IMAGE}@${ARM64_DIGEST}"
|
|
- name: Verify multi-platform image
|
|
run: |
|
|
image="${WORKSHOP_IMAGE}:sha-${GITHUB_SHA}"
|
|
manifest="$(docker buildx imagetools inspect "$image" --raw)"
|
|
for architecture in amd64 arm64; do
|
|
jq --exit-status --arg architecture "$architecture" \
|
|
'any(.manifests[]; .platform.os == "linux" and .platform.architecture == $architecture)' \
|
|
<<<"$manifest" >/dev/null
|
|
done
|
|
docker buildx imagetools inspect "$image"
|