Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 3 additions & 86 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1313,96 +1313,13 @@ jobs:
run: |
"${HAWKEYE_INSTALL_DIR}/hawkeye" check

architecture-doc:
name: Architecture doc path citations are current
runs-on: ubuntu-latest
timeout-minutes: 20
# Deliberately NOT gated by the `changes` path filter: `cargo xtask
# check-architecture-doc` fails, naming every one, if a path citation in
# docs/architecture.md isn't found where it's cited (see
# `citation_exists`'s doc comment in xtask/src/architecture_doc.rs for
# exactly where each citation shape is checked), and the citations
# aren't limited to any fixed set of paths — the doc can cite any
# tracked file. A path-filter allowlist here would need to list every
# file the doc could ever cite and be kept current as citations are
# added, which is exactly the kind of drift this check exists to catch;
# a rename/removal of a currently-cited file wouldn't itself touch
# docs/architecture.md, so gating on that path (as a prior version of
# this job did) could skip the check on the very PR that goes stale.
# Run unconditionally instead.
#
# A manual E2E dispatch only exercises the E2E jobs; skip the rest.
if: github.event_name != 'workflow_dispatch'
env:
RUSTC_WRAPPER: sccache
SCCACHE_AZURE_CONNECTION_STRING: ${{ secrets.CACHE_AZURE_CONNECTION_STRING }}
SCCACHE_AZURE_BLOB_CONTAINER: cache
# Shares build-and-test's/clippy's key prefix: `cargo xtask
# check-architecture-doc` fully links the same xtask binary (and its
# rocm-core/e2e-report dependencies) those jobs already compile, so a
# cache they populated lets this job's otherwise-unconditional run
# skip a cold compile instead of paying for one on every push/PR/
# merge_group event.
SCCACHE_AZURE_KEY_PREFIX: rocm-cli/build-and-test
SCCACHE_AZURE_RW_MODE: ${{ (github.event_name == 'push' || github.event_name == 'merge_group') && 'READ_WRITE' || 'READ_ONLY' }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

# See clippy's equivalent step for why this is a probe (continue-on-error
# plus a follow-up health check) rather than a hard requirement, and why
# failure clears the Azure variables rather than the wrapper.
- name: Set up sccache
continue-on-error: true
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.17.0

- name: Probe sccache cache backend
id: sccache_probe
run: |
disable() {
echo "SCCACHE_AZURE_CONNECTION_STRING=" >> "$GITHUB_ENV"
echo "SCCACHE_AZURE_BLOB_CONTAINER=" >> "$GITHUB_ENV"
}
if ! command -v sccache >/dev/null; then
echo "::warning::sccache is not installed; compiling without it."
echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
# Nothing will read the credential now; don't leave it in the job env.
disable
exit 0
fi
# sccache is the compiler wrapper from here on, remote backend or not,
# so there are statistics worth reporting either way.
echo "active=true" >> "$GITHUB_OUTPUT"
if [ -z "${SCCACHE_AZURE_CONNECTION_STRING}" ]; then
echo "::notice::No cache credential available (expected on forks); compiling without a shared cache."
disable
exit 0
fi
if ! sccache --start-server; then
echo "::warning::sccache could not reach the cache backend; compiling without a shared cache."
# Leave no half-started server behind for the cargo steps to find.
sccache --stop-server || true
disable
fi

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0

- name: Architecture doc path citations are current
run: cargo xtask check-architecture-doc

- name: sccache stats
if: steps.sccache_probe.outputs.active == 'true'
run: sccache --show-stats

docs-links:
name: Markdown links resolve (lychee)
runs-on: ubuntu-latest
timeout-minutes: 20
# Deliberately NOT gated by the `changes` path filter, for the same reason
# as architecture-doc above: a markdown link can go stale when the file or
# heading it points at moves, without the markdown file itself changing.
# Run unconditionally instead.
# Deliberately NOT gated by the `changes` path filter: a markdown link can
# go stale when the file or heading it points at moves, without the
# markdown file itself changing. Run unconditionally instead.
#
# A manual E2E dispatch only exercises the E2E jobs; skip the rest.
if: github.event_name != 'workflow_dispatch'
Expand Down
13 changes: 0 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,6 @@ repos:
pass_filenames: false
stages: [pre-push]
groups: [local-tools] # runs in the dedicated build-and-test CI job
- id: architecture-doc
name: architecture doc path citations are current
# No `types:`/`files:` filter, unlike its siblings above: the CI job
# this mirrors runs unconditionally too, because a change anywhere in
# the tracked tree (not just a Rust file, and not just
# docs/architecture.md itself) can make a citation stale without
# touching the doc that cites it — see the CI job's own comment in
# ci.yml for why gating this on a path filter would be unsound.
entry: cargo xtask check-architecture-doc
language: system
pass_filenames: false
stages: [pre-push] # compiles xtask; too slow for every commit
groups: [local-tools] # runs in the dedicated `architecture-doc` CI job
- id: powershell-script-analyzer
name: PSScriptAnalyzer
# Lints every .ps1 with PSScriptAnalyzer, which also covers syntax (a file
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ cargo install hawkeye@7.0.0 --locked # pinned to match the CI license-headers

### Module organization

New subcommands and subsystems default to their own file from day one — don't let them grow inside `main.rs`/`lib.rs` waiting for a future extraction pass. See `docs/architecture.md` for the two extraction patterns in use, the current module map, and the module-organization convention in full.
New subcommands and subsystems default to their own file from day one — don't let them grow inside `main.rs`/`lib.rs` waiting for a future extraction pass. See `docs/architecture.md` for the two extraction patterns in use, the current module map, and the module-organization convention in full — its path citations are relative markdown links, checked for resolution (not prose accuracy) by the `docs-links` job below.

Crate-layering invariants (e.g. `rocmd` must never depend on `rocm`) are enforced by `cargo xtask check-crate-edges` (`xtask/src/crate_edges.rs`).

`docs/architecture.md`'s path citations are enforced by `cargo xtask check-architecture-doc` (`xtask/src/architecture_doc.rs`) — it fails CI if a citation isn't found where it's cited, naming the expected location per citation (exactly where depends on its shape: a slash path, a bare filename, or a bare directory name; see `citation_exists`'s doc comment in that file for the full rule) — though it doesn't check the accuracy of the surrounding prose.

Every local (relative-path) markdown link and `#anchor` fragment in the repo — outside `docs/rocm-docs/`, which `docs-build` covers instead — is checked by the `docs-links` CI job (`lychee.toml`); it runs offline only, so it doesn't catch broken external `https://` links (see `lychee.toml` for the current exclusions).

### Test commands
Expand Down
12 changes: 0 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ publish = false
[workspace.dependencies]
anyhow = "1.0"
async-stream = "0.3"
pulldown-cmark = { version = "0.12", default-features = false }
axum = "0.8"
Comment thread
jussielo-amd marked this conversation as resolved.
Resolved
clap = { version = "4.6", features = ["derive", "string", "suggestions"] }
clap_complete = "4.6"
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ repository.
| proc-macro2 | 1.0.106 | MIT OR Apache-2.0 |
| proc-macro2-diagnostics | 0.10.1 | MIT/Apache-2.0 |
| proptest | 1.11.0 | MIT OR Apache-2.0 |
| pulldown-cmark | 0.12.2 | MIT |
| quick-xml | 0.39.4 | MIT |
| quinn | 0.11.11 | MIT OR Apache-2.0 |
| quinn-proto | 0.11.15 | MIT OR Apache-2.0 |
Expand Down
30 changes: 0 additions & 30 deletions THIRD_PARTY_NOTICES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10744,36 +10744,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================================================
MIT License
================================================================================

The following component(s) are licensed under MIT License:
- pulldown-cmark 0.12.2 <https://github.com/raphlinus/pulldown-cmark>

The MIT License

Copyright 2015 Google Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


================================================================================
MIT License
================================================================================
Expand Down
Loading
Loading