Build Bluefin dakota #1961
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Bluefin dakota | |
| on: | |
| push: | |
| branches: [testing] | |
| paths: | |
| - "elements/**" | |
| - "patches/**" | |
| - "project.conf" | |
| - "include/**" | |
| # Fires daily at 13:00 UTC — 5 hours after the gnome-build-meta nightly | |
| # (~08:00 UTC) to absorb nightly deltas before building. | |
| # NOTE: schedule triggers run on the default branch; set testing as the | |
| # default branch in repo settings for this to target testing. | |
| schedule: | |
| - cron: "0 13 * * *" | |
| workflow_dispatch: | |
| permissions: read-all | |
| env: | |
| IMAGE_NAME: dakota | |
| IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | |
| concurrency: | |
| group: dakota-bst-build-global | |
| cancel-in-progress: false | |
| jobs: | |
| verify-default-branch: | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push' | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Verify repository default branch is "testing" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| db=$(gh api "repos/${GITHUB_REPOSITORY}" --jq .default_branch) | |
| if [ "$db" != "testing" ]; then | |
| echo "::error::default branch is '$db', expected 'testing'. Daily schedule will silently target wrong branch. Fix repo settings." | |
| exit 1 | |
| fi | |
| build: | |
| needs: [verify-default-branch] | |
| if: (!cancelled()) && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push') | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 350 | |
| # The BuildBox backend has four action slots. Start every image variant | |
| # together; the backend remains the global execution-capacity limit. | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 4 | |
| matrix: | |
| include: | |
| - variant: default | |
| element: oci/bluefin.bst | |
| image_suffix: "" | |
| publish: true | |
| continue: false | |
| - variant: nvidia | |
| element: oci/bluefin-nvidia.bst | |
| image_suffix: "-nvidia" | |
| publish: true | |
| continue: true | |
| - variant: gaming | |
| element: oci/bluefin.bst | |
| image_suffix: "-gaming" | |
| publish: true | |
| continue: true | |
| gaming: "true" | |
| - variant: nvidia-gaming | |
| element: oci/bluefin-nvidia.bst | |
| image_suffix: "-nvidia-gaming" | |
| publish: true | |
| continue: true | |
| gaming: "true" | |
| continue-on-error: ${{ matrix.continue }} | |
| env: | |
| BUILD_GAMING: ${{ matrix.gaming || 'false' }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Capture build timestamp | |
| id: timestamp | |
| run: echo "created=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_OUTPUT" | |
| - name: Setup runner | |
| uses: projectbluefin/actions/bootc-build/setup-runner@v1 | |
| with: | |
| storage-backend: btrfs | |
| update-podman: true | |
| native-overlay: true | |
| install-tools: '["just"]' | |
| - name: Generate BuildStream CI config | |
| env: | |
| CASD_CLIENT_CERT: ${{ vars.CASD_CLIENT_CERT }} | |
| CASD_CLIENT_KEY: ${{ secrets.CASD_CLIENT_KEY }} | |
| uses: ./.github/actions/generate-bst-ci-config | |
| with: | |
| enable-remote-execution: "true" | |
| # BuildStream adds artifact/source push queues to the build when the | |
| # configured remotes are writable. RE and the caches share one CAS, | |
| # so payloads remain on the BuildBox host and are deduplicated there. | |
| enable-push: "true" | |
| - name: Count elements for progress tracking | |
| id: count | |
| env: | |
| BST_FLAGS: -o x86_64_v3 false --no-interactive --config /src/buildstream-ci.conf | |
| run: | | |
| set +e | |
| BST_SHOW_OUT=$(just bst show --deps all --format "%{name}" \ | |
| ${{ matrix.element }} 2>&1) | |
| rc=$? | |
| set -e | |
| if [ "$rc" -eq 0 ]; then | |
| TOTAL=$(echo "$BST_SHOW_OUT" | wc -l) | |
| echo "total=${TOTAL}" >> "$GITHUB_OUTPUT" | |
| echo "Element graph: ${TOTAL} elements" | |
| else | |
| echo "$BST_SHOW_OUT" | |
| echo "::warning::bst show failed (rc=${rc}) — progress will show absolute counts only" | |
| echo "total=0" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Build OCI image with BuildStream | |
| env: | |
| BST_FLAGS: -o x86_64_v3 false --no-interactive --config /src/buildstream-ci.conf | |
| ELEMENT_TOTAL: ${{ steps.count.outputs.total }} | |
| run: | | |
| set -o pipefail | |
| CONSOLE_LOG="logs/bst-console-${{ matrix.variant }}.log" | |
| just bst build --deps none ${{ matrix.element }} 2>&1 \ | |
| | tee "$CONSOLE_LOG" \ | |
| | python3 files/scripts/bst-progress.py | |
| # Fail closed: a green cache hit is not proof that BuildStream loaded | |
| # the remote executor. The startup banner is emitted whenever the | |
| # remote-execution block is active, even if no action needs rebuilding. | |
| if ! grep -Fq "Remote Execution Configuration" "$CONSOLE_LOG"; then | |
| echo "::error::BuildStream did not load the remote execution configuration" | |
| exit 1 | |
| fi | |
| timeout-minutes: 330 | |
| - name: Upload build logs | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: buildstream-logs-x86_64-${{ matrix.variant }} | |
| path: logs/ | |
| retention-days: 7 | |
| if-no-files-found: ignore |