mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 00:55:43 +00:00
* Add retention-days to all GitHub Actions artifacts - Use retention-days: 1 for artifacts deployed to external storage (sysroot, installer, mac app builds) - Use retention-days: 3 for debug logs and test results Prevents artifact storage quota from being exceeded. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Delete Mac build artifacts after successful deploy Automatically deletes signed-mac-app and notarized-mac-app artifacts after deployment completes. These ~250MB artifacts are only needed to pass the app between workflow jobs; once deployed, they're redundant. This prevents artifact storage from accumulating even if retention-days doesn't expire them quickly enough. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Delete ALL old build artifacts after deploy (not just current run) Both Mac and Windows installer workflows now delete ALL artifacts with their respective names after successful deployment: - Mac: signed-mac-app, notarized-mac-app - Windows: eagle-installer This ensures no artifact buildup even from failed/stale runs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Increase retention for test/build logs to 7 days These are small files useful for debugging, so keep them longer: - test.json (~100KB each) - editor_win.log / editor_mac.log (~60KB each) - failed-test-logs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Use 5-day retention to match repository maximum The repository has a 5-day maximum retention policy configured. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Delete old Mac builds from DigitalOcean when pruning appcast The appcast keeps the last 10 versions, but the old DMG files were never deleted from S3. Now when items are removed from the appcast, the corresponding DMG files are also deleted from DigitalOcean Spaces. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add cleanup job that runs even when build fails Previously, artifact cleanup only happened in the deploy job, which doesn't run if earlier jobs fail. This left behind large artifacts from failed builds, eventually hitting the storage quota. The new cleanup job runs on ubuntu-latest with `if: always()` so it executes regardless of whether build-and-sign, wait-notarization, or deploy succeeded or failed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
140 lines
5.0 KiB
YAML
140 lines
5.0 KiB
YAML
name: Build Linux Sysroot
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Sysroot version (e.g., v2, v3)'
|
|
required: true
|
|
default: 'v2'
|
|
type: string
|
|
architecture:
|
|
description: 'Target architecture'
|
|
required: true
|
|
default: 'amd64'
|
|
type: choice
|
|
options:
|
|
- amd64
|
|
- arm64
|
|
- both
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-sysroot-amd64:
|
|
if: ${{ inputs.architecture == 'amd64' || inputs.architecture == 'both' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build sysroot
|
|
run: ./tools/sysroot/build_sysroot.sh
|
|
|
|
- name: Upload sysroot artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ubuntu-noble-sysroot-amd64
|
|
path: tools/sysroot/output/
|
|
retention-days: 1
|
|
|
|
- name: Install AWS CLI
|
|
run: |
|
|
if ! command -v aws &> /dev/null; then
|
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
|
unzip -q awscliv2.zip
|
|
sudo ./aws/install
|
|
fi
|
|
|
|
- name: Upload to DigitalOcean Spaces
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_KEY }}
|
|
run: |
|
|
# Upload sysroot tarball to DO Spaces
|
|
aws s3 cp tools/sysroot/output/ubuntu_noble_amd64_sysroot.tar.xz \
|
|
s3://eagle0-sysroot/${{ inputs.version }}/ubuntu_noble_amd64_sysroot.tar.xz \
|
|
--endpoint-url https://sfo3.digitaloceanspaces.com \
|
|
--acl public-read
|
|
|
|
# Upload sha256 file
|
|
aws s3 cp tools/sysroot/output/ubuntu_noble_amd64_sysroot.sha256 \
|
|
s3://eagle0-sysroot/${{ inputs.version }}/ubuntu_noble_amd64_sysroot.sha256 \
|
|
--endpoint-url https://sfo3.digitaloceanspaces.com \
|
|
--acl public-read
|
|
|
|
echo ""
|
|
echo "=== AMD64 Sysroot uploaded ==="
|
|
echo "URL: https://eagle0-sysroot.sfo3.digitaloceanspaces.com/${{ inputs.version }}/ubuntu_noble_amd64_sysroot.tar.xz"
|
|
echo "SHA256: $(cat tools/sysroot/output/ubuntu_noble_amd64_sysroot.sha256)"
|
|
echo ""
|
|
echo "Update MODULE.bazel with:"
|
|
echo "sysroot("
|
|
echo " name = \"linux_sysroot\","
|
|
echo " sha256 = \"$(cat tools/sysroot/output/ubuntu_noble_amd64_sysroot.sha256)\","
|
|
echo " urls = [\"https://eagle0-sysroot.sfo3.digitaloceanspaces.com/${{ inputs.version }}/ubuntu_noble_amd64_sysroot.tar.xz\"],"
|
|
echo ")"
|
|
|
|
build-sysroot-arm64:
|
|
if: ${{ inputs.architecture == 'arm64' || inputs.architecture == 'both' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU for ARM64 emulation
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
platforms: arm64
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build ARM64 sysroot
|
|
run: ./tools/sysroot/build_sysroot_arm64.sh
|
|
|
|
- name: Upload sysroot artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ubuntu-noble-sysroot-arm64
|
|
path: tools/sysroot/output/
|
|
retention-days: 1
|
|
|
|
- name: Install AWS CLI
|
|
run: |
|
|
if ! command -v aws &> /dev/null; then
|
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
|
unzip -q awscliv2.zip
|
|
sudo ./aws/install
|
|
fi
|
|
|
|
- name: Upload to DigitalOcean Spaces
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_KEY }}
|
|
run: |
|
|
# Upload sysroot tarball to DO Spaces
|
|
aws s3 cp tools/sysroot/output/ubuntu_noble_arm64_sysroot.tar.xz \
|
|
s3://eagle0-sysroot/${{ inputs.version }}/ubuntu_noble_arm64_sysroot.tar.xz \
|
|
--endpoint-url https://sfo3.digitaloceanspaces.com \
|
|
--acl public-read
|
|
|
|
# Upload sha256 file
|
|
aws s3 cp tools/sysroot/output/ubuntu_noble_arm64_sysroot.sha256 \
|
|
s3://eagle0-sysroot/${{ inputs.version }}/ubuntu_noble_arm64_sysroot.sha256 \
|
|
--endpoint-url https://sfo3.digitaloceanspaces.com \
|
|
--acl public-read
|
|
|
|
echo ""
|
|
echo "=== ARM64 Sysroot uploaded ==="
|
|
echo "URL: https://eagle0-sysroot.sfo3.digitaloceanspaces.com/${{ inputs.version }}/ubuntu_noble_arm64_sysroot.tar.xz"
|
|
echo "SHA256: $(cat tools/sysroot/output/ubuntu_noble_arm64_sysroot.sha256)"
|
|
echo ""
|
|
echo "Update MODULE.bazel with:"
|
|
echo "sysroot("
|
|
echo " name = \"linux_sysroot_arm64\","
|
|
echo " sha256 = \"$(cat tools/sysroot/output/ubuntu_noble_arm64_sysroot.sha256)\","
|
|
echo " urls = [\"https://eagle0-sysroot.sfo3.digitaloceanspaces.com/${{ inputs.version }}/ubuntu_noble_arm64_sysroot.tar.xz\"],"
|
|
echo ")"
|