7a0da7932b
Backwards Compatibility / Verify Encryption Constants (push) Waiting to run
Backwards Compatibility / PyPI Version Compatibility (push) Waiting to run
Backwards Compatibility / Database Migration Tests (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
CodeQL Advanced / Analyze (python) (push) Waiting to run
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-form] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-metrics] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-workflow] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-core] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-pages] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [history-news] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [library] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [link-analytics] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [mobile] (push) Blocked by required conditions
Docker Tests (Consolidated) / detect-changes (push) Waiting to run
Docker Tests (Consolidated) / Build Test Image (push) Waiting to run
Docker Tests (Consolidated) / All Pytest Tests + Coverage (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [accessibility] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [api-crud] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-login] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-pages] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-register] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-core] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-lifecycle] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [error-benchmark] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) (push) Blocked by required conditions
Docker Tests (Consolidated) / Accessibility Tests (push) Blocked by required conditions
Docker Tests (Consolidated) / LLM Unit Tests (push) Blocked by required conditions
Docker Tests (Consolidated) / LLM Example Tests (push) Blocked by required conditions
Docker Tests (Consolidated) / Production Image Smoke Test (push) Blocked by required conditions
Docker Tests (Consolidated) / Infrastructure Tests (push) Blocked by required conditions
OSSF Scorecard / OSSF Security Scorecard Analysis (push) Waiting to run
OSV-Scanner (Scheduled) / scan-scheduled (push) Failing after 0s
Create Release / test-gate (push) Has been cancelled
Create Release / release-gate (push) Has been cancelled
Create Release / ci-gate (push) Has been cancelled
Create Release / version-check (push) Has been cancelled
Create Release / e2e-test-gate (push) Has been cancelled
Create Release / responsive-test-gate (push) Has been cancelled
Create Release / compat-test-gate (push) Has been cancelled
Create Release / compose-integration-gate (push) Has been cancelled
Create Release / vulture-gate (push) Has been cancelled
Create Release / build (push) Has been cancelled
Create Release / provenance (push) Has been cancelled
Create Release / prerelease-docker (push) Has been cancelled
Create Release / publish-docker (push) Has been cancelled
Create Release / create-release (push) Has been cancelled
Create Release / cleanup-changelog (push) Has been cancelled
Create Release / trigger-pypi (push) Has been cancelled
Create Release / monitor-pypi (push) Has been cancelled
Create Release / Clean up orphan prerelease tags and signatures (push) Has been cancelled
157 lines
5.4 KiB
YAML
157 lines
5.4 KiB
YAML
name: Test Multi-Architecture Docker Build
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test-multiarch-build:
|
|
name: Test Multi-Arch Docker Build
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- platform: linux/amd64
|
|
runs-on: ubuntu-latest
|
|
platform_slug: linux-amd64
|
|
- platform: linux/arm64
|
|
runs-on: ubuntu-24.04-arm
|
|
platform_slug: linux-arm64
|
|
|
|
runs-on: ${{ matrix.runs-on }}
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- name: Harden the runner (Audit all outbound calls)
|
|
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Check out the repo
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
|
|
|
|
- name: Build Docker image for ${{ matrix.platform }}
|
|
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
|
|
with:
|
|
context: .
|
|
platforms: ${{ matrix.platform }}
|
|
push: false
|
|
load: false
|
|
cache-from: type=gha,scope=${{ matrix.platform_slug }}
|
|
cache-to: type=gha,mode=max,scope=${{ matrix.platform_slug }}
|
|
tags: ldr-test:${{ matrix.platform_slug }}-${{ github.sha }}
|
|
outputs: type=docker,dest=/tmp/image-${{ matrix.platform_slug }}.tar
|
|
|
|
- name: Inspect built image
|
|
run: |
|
|
# Load and inspect the image
|
|
docker load < "/tmp/image-${{ matrix.platform_slug }}.tar"
|
|
docker image inspect ldr-test:${{ matrix.platform_slug }}-${{ github.sha }}
|
|
|
|
# Get image size
|
|
IMAGE_SIZE=$(docker image inspect ldr-test:${{ matrix.platform_slug }}-${{ github.sha }} --format='{{.Size}}' | numfmt --to=iec)
|
|
echo "Image size for ${{ matrix.platform }}: $IMAGE_SIZE"
|
|
|
|
- name: Test image startup
|
|
run: |
|
|
docker load < "/tmp/image-${{ matrix.platform_slug }}.tar"
|
|
|
|
# Test that the container can start and Python works
|
|
docker run --rm --platform ${{ matrix.platform }} \
|
|
ldr-test:${{ matrix.platform_slug }}-${{ github.sha }} \
|
|
python -c "import sys; print(f'Python {sys.version} on {sys.platform}')"
|
|
|
|
# Test that the LDR package is installed
|
|
docker run --rm --platform ${{ matrix.platform }} \
|
|
ldr-test:${{ matrix.platform_slug }}-${{ github.sha }} \
|
|
python -c "import local_deep_research; print('LDR package imported successfully')"
|
|
|
|
- name: Test web server startup
|
|
run: |
|
|
docker load < "/tmp/image-${{ matrix.platform_slug }}.tar"
|
|
|
|
# Start the container in background
|
|
docker run -d --name ldr-test \
|
|
--platform ${{ matrix.platform }} \
|
|
-p 5000:5000 \
|
|
-e LDR_DB_CONFIG_KDF_ITERATIONS=1000 \
|
|
-e LDR_TEST_MODE=1 \
|
|
-e LDR_NEWS_SCHEDULER_ENABLED=false \
|
|
ldr-test:${{ matrix.platform_slug }}-${{ github.sha }}
|
|
|
|
# Wait for server to start
|
|
TIMEOUT_SECONDS=60
|
|
echo "Waiting for server to start (timeout: ${TIMEOUT_SECONDS}s)..."
|
|
for i in $(seq 1 ${TIMEOUT_SECONDS}); do
|
|
if curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health 2>/dev/null; then
|
|
echo "✅ Server started successfully after ${i} seconds on ${{ matrix.platform }}!"
|
|
break
|
|
fi
|
|
# Show progress every 10 seconds
|
|
if [ $((i % 10)) -eq 0 ]; then
|
|
echo "Still waiting... (${i}s elapsed)"
|
|
fi
|
|
if [ "$i" -eq "${TIMEOUT_SECONDS}" ]; then
|
|
echo "❌ Server failed to start within ${TIMEOUT_SECONDS} seconds"
|
|
docker logs ldr-test
|
|
exit 1
|
|
fi
|
|
sleep 1
|
|
done
|
|
|
|
# Check server response
|
|
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:5000)
|
|
echo "Server response code: $RESPONSE"
|
|
|
|
# Clean up
|
|
docker stop ldr-test
|
|
docker rm ldr-test
|
|
|
|
summary:
|
|
name: Build Summary
|
|
needs: test-multiarch-build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
if: always()
|
|
|
|
steps:
|
|
- name: Harden the runner (Audit all outbound calls)
|
|
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Summary
|
|
env:
|
|
BUILD_RESULT: ${{ needs.test-multiarch-build.result }}
|
|
run: |
|
|
{
|
|
echo "## Multi-Architecture Build Test Results"
|
|
echo ""
|
|
} >> "$GITHUB_STEP_SUMMARY"
|
|
|
|
if [ "$BUILD_RESULT" == "success" ]; then
|
|
{
|
|
echo "✅ **All platforms built and tested successfully!**"
|
|
echo ""
|
|
echo "### Tested Platforms:"
|
|
echo "- linux/amd64 ✅"
|
|
echo "- linux/arm64 ✅"
|
|
echo ""
|
|
echo "The Docker image is ready for multi-architecture deployment."
|
|
} >> "$GITHUB_STEP_SUMMARY"
|
|
else
|
|
{
|
|
echo "❌ **Build or tests failed**"
|
|
echo ""
|
|
echo "Please check the logs above for details."
|
|
} >> "$GITHUB_STEP_SUMMARY"
|
|
fi
|