Skip to content

⚡ feat: implement contextual tab animations with intuitive directions #13

⚡ feat: implement contextual tab animations with intuitive directions

⚡ feat: implement contextual tab animations with intuitive directions #13

Workflow file for this run

name: Quick Build & Test
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ============================================================================
# QUICK FEEDBACK - Fast checks for immediate feedback
# ============================================================================
quick-checks:
name: Quick Checks
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v17
- name: Setup Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v10
- name: Check Zig formatting
run: |
nix develop --command bash -c "
echo '🔍 Checking Zig formatting...'
zig fmt --check src/ test/ build.zig || {
echo '❌ Zig code is not properly formatted'
echo 'Run: zig fmt src/ test/ build.zig'
exit 1
}
echo '✅ Zig formatting is correct'
"
- name: Zig compilation check
run: |
nix develop --command bash -c "
echo '🔧 Quick Zig compilation check...'
zig build --summary all
"
- name: Quick Zig tests
run: |
nix develop --command bash -c "
echo '🧪 Running quick Zig tests...'
zig build test --summary all
"
# ============================================================================
# BUILD VALIDATION - Ensure the project builds correctly
# ============================================================================
build-validation:
name: Build Validation
runs-on: macos-14
needs: [quick-checks]
strategy:
matrix:
build-type: [debug, release]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v17
- name: Setup Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v10
- name: Build Zig libraries (${{ matrix.build-type }})
run: |
nix develop --command bash -c "
echo '🏗️ Building Zig libraries (${{ matrix.build-type }})...'
if [ '${{ matrix.build-type }}' = 'release' ]; then
zig build --summary all -Doptimize=ReleaseFast
else
zig build --summary all -Doptimize=Debug
fi
"
- name: Build Swift application (${{ matrix.build-type }})
run: |
nix develop --command bash -c "
echo '🏗️ Building Swift application (${{ matrix.build-type }})...'
if [ '${{ matrix.build-type }}' = 'release' ]; then
zig build swift --summary all -Doptimize=ReleaseFast
else
zig build swift --summary all -Doptimize=Debug
fi
"
- name: Verify build output
run: |
echo '✅ Verifying build output...'
BINARY=".build/${{ matrix.build-type }}/plue"
if [ ! -f "$BINARY" ]; then
echo "❌ Binary not found at $BINARY"
exit 1
fi
echo "Binary info:"
file "$BINARY"
ls -lh "$BINARY"
# Quick smoke test
timeout 5s "$BINARY" --help || echo "Smoke test completed"
- name: Upload build artifacts (debug only)
if: matrix.build-type == 'debug'
uses: actions/upload-artifact@v4
with:
name: debug-build-${{ github.sha }}
path: |
.build/debug/plue
retention-days: 7
# ============================================================================
# NIX BUILD VALIDATION - Ensure Nix flake works correctly
# ============================================================================
nix-build:
name: Nix Build Validation
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v17
- name: Setup Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v10
- name: Test Nix development shell
run: |
echo '🧪 Testing Nix development environment...'
nix develop --command bash -c "
echo '✅ Development shell works'
echo 'Available tools:'
which zig
which swift
zig version
swift --version
"
- name: Build with Nix flake
run: |
echo '🏗️ Building with Nix flake...'
nix build --show-trace
- name: Test Nix app
run: |
echo '🧪 Testing Nix-built application...'
timeout 5s nix run . -- --help || echo "Nix app test completed"
# ============================================================================
# DEVELOPMENT ENVIRONMENT CHECK
# ============================================================================
dev-environment:
name: Development Environment
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v17
- name: Setup Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v10
- name: Check development dependencies
run: |
nix develop --command bash -c "
echo '🔍 Checking development environment...'
echo 'Zig version:'
zig version
echo 'Swift version:'
swift --version
echo 'Package dependencies:'
swift package describe || echo 'Package description completed'
echo 'Git status:'
git status --porcelain || echo 'Git check completed'
echo '✅ Development environment is ready'
"
# ============================================================================
# STATUS SUMMARY
# ============================================================================
build-status:
name: Build Status Summary
runs-on: ubuntu-latest
needs: [quick-checks, build-validation, nix-build, dev-environment]
if: always()
steps:
- name: Report build status
run: |
echo "## Build Status Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ needs.quick-checks.result }}" = "success" ]; then
echo "✅ Quick Checks: Passed" >> $GITHUB_STEP_SUMMARY
else
echo "❌ Quick Checks: Failed" >> $GITHUB_STEP_SUMMARY
fi
if [ "${{ needs.build-validation.result }}" = "success" ]; then
echo "✅ Build Validation: Passed" >> $GITHUB_STEP_SUMMARY
else
echo "❌ Build Validation: Failed" >> $GITHUB_STEP_SUMMARY
fi
if [ "${{ needs.nix-build.result }}" = "success" ]; then
echo "✅ Nix Build: Passed" >> $GITHUB_STEP_SUMMARY
else
echo "❌ Nix Build: Failed" >> $GITHUB_STEP_SUMMARY
fi
if [ "${{ needs.dev-environment.result }}" = "success" ]; then
echo "✅ Development Environment: Ready" >> $GITHUB_STEP_SUMMARY
else
echo "❌ Development Environment: Issues" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Commit**: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
echo "**Branch**: ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY