Repository navigation
ci(cache): add a ci.toml declaring fbuild's cache ceiling (8.73 GiB = 87% of the 10 GiB cap) #510
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
| # Generated by ci/render_workflows.py from ci/board_families.json. | |
| name: ci-minimal | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| types: [opened, labeled, unlabeled, synchronize, reopened] | |
| workflow_dispatch: {} | |
| concurrency: | |
| group: ci-minimal-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| verify: | |
| name: Verify local gate | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| fetch-depth: 2 | |
| persist-credentials: false | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Verify source-bound local proof | |
| env: | |
| GATE_EVENT: ${{ github.event_name }} | |
| run: | | |
| if [ "$GATE_EVENT" = "pull_request" ]; then | |
| uvx --from git+https://github.com/zackees/ci.yml@653196986fcc5d7469d74e8d4836b547729ee8e3 ci-lint local-gate verify --repo . | |
| else | |
| echo "Local proof verification is required on pull requests" | |
| fi | |
| linux: | |
| if: github.event_name != 'pull_request' || (!contains(github.event.pull_request.labels.*.name, 'ci-test') && !contains(github.event.pull_request.labels.*.name, 'ci-full')) | |
| needs: verify | |
| uses: ./.github/workflows/check-ubuntu.yml | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| board_plan: | |
| needs: verify | |
| name: Select boards for changed paths | |
| if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci-test') && !contains(github.event.pull_request.labels.*.name, 'ci-full') | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.select.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@v3 | |
| - id: select | |
| env: | |
| BASE: ${{ github.event.pull_request.base.sha }} | |
| run: | | |
| base=$(git merge-base "$BASE" HEAD || true) | |
| matrix=$(cd ci && uv run --no-project python select_boards.py --matrix --base "$base" --head HEAD) | |
| echo "selected: $matrix" | |
| echo "matrix=$matrix" >> "$GITHUB_OUTPUT" | |
| fbuild_bin: | |
| name: Build fbuild (shared by board jobs) | |
| if: needs.board_plan.outputs.matrix != '[]' | |
| needs: board_plan | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-D warnings" | |
| SOLDR_TARGET_BLOCK_FREE_GB: "2" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| persist-credentials: false | |
| - uses: zackees/setup-soldr@dfbe9627f6cb0226716b61625b99a58949162720 | |
| with: | |
| cache-preset: foundation | |
| prebuild-deps-flags: "" | |
| prebuild-deps: none | |
| linker: platform-default | |
| cache-payload-warn-bytes: 2GiB | |
| cache-key-suffix: fbuild-rust-debug | |
| save-cache: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }} | |
| - run: | | |
| sudo apt-get -o Acquire::http::Timeout=30 -o Acquire::Retries=3 update | |
| sudo apt-get -o Acquire::http::Timeout=30 -o Acquire::Retries=3 install -y libudev-dev pkg-config | |
| - run: soldr cargo build -p fbuild-cli -p fbuild-daemon | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: fbuild-bin-linux-debug | |
| path: | | |
| target/debug/fbuild | |
| target/debug/fbuild-daemon | |
| if-no-files-found: error | |
| retention-days: 1 | |
| pr_boards: | |
| name: ${{ matrix.workflow_name }} | |
| needs: [board_plan, fbuild_bin] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJSON(needs.board_plan.outputs.matrix) }} | |
| uses: ./.github/workflows/template_build.yml | |
| with: | |
| workflow-name: ${{ matrix.workflow_name }} | |
| test-dir: ${{ matrix.test_dir }} | |
| env-name: ${{ matrix.env_name }} | |
| firmware-ext: ${{ matrix.firmware_ext }} | |
| checkout_ref: ${{ github.event.pull_request.head.sha }} | |
| fbuild-artifact: fbuild-bin-linux-debug | |
| toolchain-cache: ${{ matrix.toolchain_cache }} | |
| reuse_decision: | |
| needs: verify | |
| name: Verified reuse decision (shadow) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| continue-on-error: true | |
| permissions: | |
| contents: read | |
| actions: read | |
| pull-requests: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| continue-on-error: true | |
| timeout-minutes: 1 | |
| with: | |
| repository: zackees/ci.yml | |
| ref: b93b8c4a20ce3cd476c75a278ad01a31bde2438b | |
| path: .ci-lint | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@v3 | |
| continue-on-error: true | |
| timeout-minutes: 1 | |
| - name: Reuse decision (GEN-021, shadow) | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| working-directory: .ci-lint | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: >- | |
| uv run --no-project python -m ci_lint reuse-check | |
| --workflow ci-minimal.yml --mode shadow | |
| --required-job "linux / Check (ubuntu-latest)" | |
| --required-job "linux / Python facade tests (ubuntu-latest)" | |
| --required-job "CI selected coverage" | |
| test: | |
| needs: verify | |
| if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci-test') && !contains(github.event.pull_request.labels.*.name, 'ci-full') | |
| uses: ./.github/workflows/ci-test.yml | |
| with: | |
| candidate_sha: ${{ github.event.pull_request.head.sha }} | |
| full: | |
| needs: verify | |
| if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci-full') | |
| uses: ./.github/workflows/ci-full.yml | |
| with: | |
| candidate_sha: ${{ github.event.pull_request.head.sha }} | |
| selected-coverage: | |
| name: CI selected coverage | |
| if: always() | |
| needs: [linux, test, full, pr_boards] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - env: | |
| LINUX: ${{ needs.linux.result }} | |
| TEST_SELECTED: ${{ contains(github.event.pull_request.labels.*.name, 'ci-test') }} | |
| TEST_RESULT: ${{ needs.test.result }} | |
| FULL_SELECTED: ${{ contains(github.event.pull_request.labels.*.name, 'ci-full') }} | |
| FULL_RESULT: ${{ needs.full.result }} | |
| FULL_COVERAGE: ${{ needs.full.outputs.coverage }} | |
| PR_BOARDS: ${{ needs.pr_boards.result }} | |
| run: | | |
| if [ "$FULL_SELECTED" = true ]; then | |
| test "$FULL_RESULT" = success | |
| test "$FULL_COVERAGE" = true | |
| elif [ "$TEST_SELECTED" = true ]; then | |
| test "$TEST_RESULT" = success | |
| else | |
| test "$LINUX" = success | |
| # Path-selected boards: skipped when the PR touches none. | |
| case "$PR_BOARDS" in success|skipped) ;; *) exit 1 ;; esac | |
| fi |