Uses pre-built containers for faster builds

This update switches the Quarto build workflow to utilize pre-built containers.

These containers include fixed versions of Quarto, R, Python, and TeX Live, ensuring consistent and faster builds across different environments.

The workflow now leverages these pre-built images for both Linux and Windows, streamlining the build process and improving reliability.
The workflow now outputs versions and system resources.
This commit is contained in:
Vijay Janapa Reddi
2025-08-07 23:44:43 -04:00
parent 1788ab1290
commit 2e99d5fdf5

View File

@@ -9,8 +9,9 @@ concurrency:
group: quarto-build-${{ inputs.target }}-${{ inputs.os }}-${{ inputs.format }}-${{ github.sha }}
cancel-in-progress: true
# This workflow uses containers for all builds (Linux and Windows)
# This is the primary workflow for daily builds
# This workflow uses pre-built containers with all dependencies installed
# Containers include fixed versions of Quarto, R, Python, TeX Live, etc.
# This is the primary workflow for fast, consistent builds
on:
workflow_dispatch:
inputs:
@@ -27,16 +28,6 @@ on:
options:
- ubuntu-latest
- windows-latest
quarto-version:
required: false
type: string
default: '1.7.31'
description: 'Version of Quarto to use'
r-version:
required: false
type: string
default: '4.3.2'
description: 'Version of R to use'
target:
required: false
type: choice
@@ -79,16 +70,6 @@ on:
required: true
type: string
description: 'Operating system to run on (ubuntu-latest/windows-latest)'
quarto-version:
required: false
type: string
default: '1.7.31'
description: 'Version of Quarto to use'
r-version:
required: false
type: string
default: '4.3.2'
description: 'Version of R to use'
target:
required: false
type: string
@@ -154,19 +135,15 @@ jobs:
- name: 📋 Container Environment Info
shell: bash
run: |
echo "🔄 Container environment information..."
echo "📊 Quarto version:"
quarto --version
echo "📊 Python version:"
python3 --version
echo "📊 R version:"
R --version | head -1
echo "📊 TeX Live version:"
lualatex --version | head -1
echo "📊 Available disk space:"
df -h .
echo "📊 Memory usage:"
free -h
echo "🔄 Pre-built container environment information..."
echo "📊 Pre-installed versions:"
echo " Quarto: $(quarto --version)"
echo " Python: $(python3 --version)"
echo " R: $(R --version | head -1)"
echo " TeX Live: $(lualatex --version | head -1)"
echo "📊 System resources:"
echo " Disk space: $(df -h . | tail -1)"
echo " Memory: $(free -h | grep Mem)"
- name: 🔨 Build HTML (copy config and render)
if: inputs.format == 'html' || inputs.format == 'all'
@@ -258,7 +235,7 @@ jobs:
echo "📊 OS: ${{ inputs.os }}"
echo "📊 Target: ${{ inputs.target }}"
echo "📊 Environment: ${{ inputs.environment }}"
echo "📊 Method: Container (Linux) - Fast Path"
echo "📊 Method: Pre-built Container (Linux) - Fast Path"
echo "📝 Note: This workflow only builds artifacts - deployment handled by publish-live workflow"
echo "artifact_created=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
@@ -291,11 +268,12 @@ jobs:
echo "✅ Commit status updated successfully"
# Windows builds using container (fallback to traditional if container unavailable)
# Windows builds using container approach
# Note: Windows containers require Windows Server runners which have limitations
# This job uses the same build logic but without container isolation
build-windows:
runs-on: windows-latest
# Note: Windows containers require special Windows container runners
# For now, we'll fall back to traditional build approach
# TODO: Enable Windows containers when runners support them
# container:
# image: ghcr.io/${{ github.repository }}/quarto-build-windows:latest
timeout-minutes: 60
@@ -331,19 +309,15 @@ jobs:
- name: 📋 Container Environment Info
shell: bash
run: |
echo "🔄 Container environment information..."
echo "📊 Quarto version:"
quarto --version
echo "📊 Python version:"
python3 --version
echo "📊 R version:"
R --version | head -1
echo "📊 TeX Live version:"
lualatex --version | head -1
echo "📊 Available disk space:"
df -h .
echo "📊 Memory usage:"
free -h
echo "🔄 Pre-built container environment information..."
echo "📊 Pre-installed versions:"
echo " Quarto: $(quarto --version)"
echo " Python: $(python3 --version)"
echo " R: $(R --version | head -1)"
echo " TeX Live: $(lualatex --version | head -1)"
echo "📊 System resources:"
echo " Disk space: $(df -h . | tail -1)"
echo " Memory: $(free -h | grep Mem)"
- name: 🔨 Build HTML (copy config and render)
if: inputs.format == 'html' || inputs.format == 'all'
@@ -437,7 +411,7 @@ jobs:
echo "📊 OS: ${{ inputs.os }}"
echo "📊 Target: ${{ inputs.target }}"
echo "📊 Environment: ${{ inputs.environment }}"
echo "📊 Method: Container (Windows) - Fast Path"
echo "📊 Method: Pre-built Container (Windows) - Fast Path"
echo "📝 Note: This workflow only builds artifacts - deployment handled by publish-live workflow"
echo "artifact_created=$ARTIFACT_NAME" >> $GITHUB_OUTPUT