chore: release v0.17.1 #1098
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. | |
| # | |
| # Path-aware gating: the `changes` job classifies the diff, and each gate only | |
| # runs when its surface actually changed — a docs-only PR no longer compiles | |
| # the Rust workspace twice. This MUST stay as job-level `if:` conditions, NOT | |
| # `on.<event>.paths` filters: rust/coverage/docs/web are required status | |
| # checks, and a workflow that never triggers leaves them "Expected — waiting" | |
| # forever (blocking every docs-only PR and the release-plz PR). A job skipped | |
| # by `if:` reports "skipped", which branch protection counts as passing. | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| outputs: | |
| rust: ${{ steps.filter.outputs.rust }} | |
| website: ${{ steps.filter.outputs.website }} | |
| web: ${{ steps.filter.outputs.web }} | |
| nix: ${{ steps.filter.outputs.nix }} | |
| release: ${{ steps.filter.outputs.release }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| rust: | |
| - 'crates/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/ci.yml' | |
| website: | |
| - 'website/**' | |
| - '.github/workflows/ci.yml' | |
| web: | |
| - 'web/**' | |
| - '.github/workflows/ci.yml' | |
| nix: | |
| - 'web/**' | |
| - 'flake.nix' | |
| - 'flake.lock' | |
| - 'nix/**' | |
| - '.github/workflows/ci.yml' | |
| release: | |
| - 'release-plz.toml' | |
| - 'scripts/release/**' | |
| - 'scripts/tests/release-sync-pr.sh' | |
| - '.github/workflows/release-plz.yml' | |
| - '.github/workflows/ci.yml' | |
| release: | |
| needs: changes | |
| if: needs.changes.outputs.release == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Test release PR synchronization | |
| run: bash scripts/tests/release-sync-pr.sh | |
| docs: | |
| needs: changes | |
| if: needs.changes.outputs.website == 'true' | |
| 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: | |
| needs: changes | |
| if: needs.changes.outputs.web == 'true' | |
| 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 | |
| nix-web: | |
| needs: changes | |
| if: needs.changes.outputs.nix == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: DeterminateSystems/determinate-nix-action@v3 | |
| - name: Build mold-web with Nix sandbox | |
| run: nix build .#mold-web --print-build-logs | |
| rust: | |
| needs: changes | |
| if: needs.changes.outputs.rust == 'true' | |
| 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,mdns | |
| coverage: | |
| needs: changes | |
| if: needs.changes.outputs.rust == 'true' | |
| 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 |