Build optimization: pre-built PM3 binaries, ARM64 CI, base image caching
Replace PM3 compile-from-source in pi-gen with pre-built tarball extraction (saves 43-58 min). Merge stagePM3 into stageDangerousPi as 02-pm3-install substage, renumber all subsequent substages. Switch CI PM3 build to native ARM64 runner (ubuntu-24.04-arm64) eliminating QEMU overhead. Add weekly base-image workflow for pre-baking stages 0-2. Support PM3_TARBALL, BASE_IMAGE, and APT_PROXY env vars in build-image.sh. Also includes prior Phase 5 work: theme system, design system integration, component update system, OS updates, CI build pipeline, and test results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
152
.github/workflows/build-release.yml
vendored
Normal file
152
.github/workflows/build-release.yml
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
name: Build and Release Components
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
components:
|
||||
description: 'Components to build (comma-separated, or "all")'
|
||||
required: false
|
||||
default: 'all'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
# ------------------------------------------------------------------
|
||||
# PM3: compile natively on ARM64 runner (no QEMU overhead)
|
||||
# ------------------------------------------------------------------
|
||||
build-pm3:
|
||||
runs-on: ubuntu-24.04-arm64
|
||||
strategy:
|
||||
matrix:
|
||||
python_version: ['3.11', '3.12']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build PM3 natively on aarch64
|
||||
env:
|
||||
PYTHON_VERSION: ${{ matrix.python_version }}
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v "${GITHUB_WORKSPACE}:/workspace" \
|
||||
-e "PYTHON_VERSION=${PYTHON_VERSION}" \
|
||||
-e OUTPUT_DIR=/workspace/dist \
|
||||
-w /workspace \
|
||||
debian:trixie \
|
||||
bash ci/build-pm3.sh
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pm3-cp${{ matrix.python_version }}
|
||||
path: dist/pm3-*.tar.gz
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Frontend: build Remix app
|
||||
# ------------------------------------------------------------------
|
||||
build-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Build frontend
|
||||
env:
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
chmod +x ci/build-frontend.sh
|
||||
VERSION="${REF_NAME#v}" ci/build-frontend.sh
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: frontend
|
||||
path: dist/frontend-*.tar.gz
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Backend: package Python source
|
||||
# ------------------------------------------------------------------
|
||||
build-backend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Package backend
|
||||
env:
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
chmod +x ci/build-backend.sh
|
||||
VERSION="${REF_NAME#v}" ci/build-backend.sh
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: backend
|
||||
path: dist/backend-*.tar.gz
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Theme: build token CSS from design system
|
||||
# ------------------------------------------------------------------
|
||||
build-theme:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout design system
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: dangerous-tacos/dt-design-system
|
||||
path: dt-design-system
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Build theme
|
||||
env:
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
chmod +x ci/build-theme.sh
|
||||
VERSION="${REF_NAME#v}" \
|
||||
DESIGN_SYSTEM_DIR="${GITHUB_WORKSPACE}/dt-design-system" \
|
||||
ci/build-theme.sh
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: theme
|
||||
path: dist/theme-*.tar.gz
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Create release with all component assets
|
||||
# ------------------------------------------------------------------
|
||||
create-release:
|
||||
needs: [build-pm3, build-frontend, build-backend, build-theme]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: dist/
|
||||
merge-multiple: true
|
||||
|
||||
- name: Generate release manifest
|
||||
env:
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
python3 ci/generate-manifest.py dist/ \
|
||||
--version "${REF_NAME#v}"
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
dist/*.tar.gz
|
||||
dist/release-manifest.json
|
||||
generate_release_notes: true
|
||||
Reference in New Issue
Block a user