Spike, not the final UI: it answers whether flare-ui can drive Alkane OS's on-box pages, and what it costs. What works: - schema/alkane-bb.json authors the sidebar as data (3 sections, 14 tabs); - src/bin/ui-spike.rs renders it through flare_ui::nav + flare_ui::shell, so the unified sidebar, ordering and surface filtering come from the schema rather than from hand-written HTML; - the render uses the shared bf- design tokens, the same ones the rest of the suite uses. Size, measured rather than assumed (armv7, release, stripped): ui-baseline 323 KiB (maud + serde_json, no flare-ui) ui-spike 771 KiB (flare-ui + wschema + sha2) marginal 448 KiB Vendoring: third-party/flare-ui is the full v0.2.9 tree pinned in flare-ui/flare-ui.lock (a partial archive does not compile, since the crate include_str!s assets from dash-editor/). vendor/ is re-generated as a cargo directory source with the new registry dependencies (maud, sha2, typenum, digest, generic-array, block-buffer, crypto-common, cfg-if, etc.) so the build still works offline. third-party/README.md records how to re-pin.
95 lines
2.6 KiB
YAML
95 lines
2.6 KiB
YAML
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
merge_group:
|
|
|
|
name: CI
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
rust:
|
|
- 1.63.0 # MSRV
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
features:
|
|
- ""
|
|
- "serde"
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Cache the registry
|
|
uses: actions/cache@v4
|
|
if: startsWith(matrix.rust, '1')
|
|
with:
|
|
path: ~/.cargo/registry/index
|
|
key: cargo-${{ matrix.rust }}-git-index
|
|
|
|
- name: Lock MSRV-compatible dependencies
|
|
if: startsWith(matrix.rust, '1')
|
|
env:
|
|
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback
|
|
# Note that this uses the runner's pre-installed stable cargo
|
|
# Also, the resolver is still too greedy, pulling in too-new serde_derive:
|
|
# https://github.com/serde-rs/serde/issues/3088
|
|
run: |
|
|
cargo generate-lockfile
|
|
cargo update -p serde --precise 1.0.228
|
|
|
|
- name: Set up Rust
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
- name: Build (no_std)
|
|
run: cargo build --no-default-features --features "${{ matrix.features }}"
|
|
|
|
- name: Build
|
|
run: cargo build --features "${{ matrix.features }}"
|
|
|
|
- name: Test
|
|
run: cargo test --features "${{ matrix.features }}"
|
|
|
|
- name: Doc
|
|
run: cargo doc --features "${{ matrix.features }}"
|
|
|
|
clippy:
|
|
name: Rustfmt and Clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up nightly Rust
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- name: Rustfmt
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy # -- -D warnings
|
|
|
|
# One job that "summarizes" the success state of this pipeline. This can then be added to branch
|
|
# protection, rather than having to add each job separately.
|
|
success:
|
|
name: Success
|
|
runs-on: ubuntu-latest
|
|
needs: [ci, clippy]
|
|
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
|
|
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
|
|
# dependencies fails.
|
|
if: always() # make sure this is never "skipped"
|
|
steps:
|
|
# Manually check the status of all dependencies. `if: failure()` does not work.
|
|
- name: check if any dependency failed
|
|
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
|