feat(catalog): SD1.5 + SDXL single-file loaders + web gallery UX (phase 1 + 2/5) #716
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: "1" | |
| # Note: CUDA builds are not run in CI — they require a GPU host with NixOS + CUDA. | |
| # CI only checks non-CUDA compilation, lints, and tests. | |
| # | |
| # Cache strategy: jobs that compile the same features share a cache key. | |
| # Only main-branch pushes save caches; PRs read from main's cache. | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install docs dependencies | |
| working-directory: website | |
| run: bun install | |
| - name: Check docs formatting | |
| working-directory: website | |
| run: bun run fmt:check | |
| - name: Verify docs references | |
| working-directory: website | |
| run: bun run verify | |
| - name: Build docs | |
| working-directory: website | |
| run: bun run build | |
| web: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install web dependencies | |
| working-directory: web | |
| run: bun install --frozen-lockfile | |
| - name: Check web formatting | |
| working-directory: web | |
| run: bun run fmt:check | |
| - name: Run web tests | |
| working-directory: web | |
| run: bun run test | |
| - name: Build web SPA (includes vue-tsc typecheck) | |
| working-directory: web | |
| run: bun run build | |
| rust: | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| SCCACHE_GHA_ENABLED: "true" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt,clippy | |
| - name: Install Rust build deps | |
| run: sudo apt-get update && sudo apt-get install -y clang lld nasm libwebp-dev | |
| - uses: mozilla-actions/sccache-action@v0.0.7 | |
| - name: Probe sccache (disable on cache outage) | |
| shell: bash | |
| run: | | |
| set +e | |
| printf 'fn main() {}\n' > /tmp/sccache_probe.rs | |
| sccache rustc --edition 2021 -- /tmp/sccache_probe.rs -o /tmp/sccache_probe | |
| status=$? | |
| rm -f /tmp/sccache_probe /tmp/sccache_probe.rs | |
| if [ $status -ne 0 ]; then | |
| echo "sccache probe failed — disabling RUSTC_WRAPPER for this job" | |
| echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV" | |
| sccache --stop-server >/dev/null 2>&1 || true | |
| fi | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: workspace-default | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| - name: Check | |
| run: cargo check --workspace | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| - name: Test | |
| run: cargo test --workspace | |
| - name: Check with all optional features | |
| run: cargo check -p mold-ai --features preview,discord,expand,tui,webp,mp4 | |
| coverage: | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| SCCACHE_GHA_ENABLED: "true" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install Rust build deps | |
| run: sudo apt-get update && sudo apt-get install -y clang lld nasm libwebp-dev | |
| - uses: mozilla-actions/sccache-action@v0.0.7 | |
| - name: Probe sccache (disable on cache outage) | |
| shell: bash | |
| run: | | |
| set +e | |
| printf 'fn main() {}\n' > /tmp/sccache_probe.rs | |
| sccache rustc --edition 2021 -- /tmp/sccache_probe.rs -o /tmp/sccache_probe | |
| status=$? | |
| rm -f /tmp/sccache_probe /tmp/sccache_probe.rs | |
| if [ $status -ne 0 ]; then | |
| echo "sccache probe failed — disabling RUSTC_WRAPPER for this job" | |
| echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV" | |
| sccache --stop-server >/dev/null 2>&1 || true | |
| fi | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: workspace-llvm-cov | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Generate coverage | |
| run: cargo llvm-cov --workspace --lcov --output-path lcov.info | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false |