Repository navigation
docs: reconcile FireCraft status, execution docs, and wiki sources #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
09cd6f6
5900f42
653a2a1
6f19a0f
4a55f6b
f86fd75
93fa7b0
079f614
ae723cd
8671874
ef2b9e3
8a8b195
6d68987
83e93bd
5e7cc50
429e6fd
e46a5b6
de6af82
2637649
bd5f262
fdf1997
3079cde
2b3a2a7
7ac6e79
e2243bb
95801f5
dbdd34f
4d98aaa
a3fe33b
4816835
45cce2f
f7010bf
294c75e
1ef97d5
cd6184b
c49b208
c13eb81
4982c64
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,133 +1,168 @@ | ||
| # GitHub Actions backup CI — mirrors the GitForge 7-job pipeline. | ||
| # GitForge is primary; this is the fallback if GitForge is unavailable. | ||
| # | ||
| # Two-job design: | ||
| # fmt — fast (~30s), fails fast, no expensive tool installs needed | ||
| # gate — the full `xtask ci-no-fmt` suite; only runs if fmt passes | ||
| # | ||
| # Both run on all pushes and PRs. The fmt job prevents wasted runner | ||
| # time on formatting errors that would fail clippy anyway. | ||
|
|
||
| # GitHub Actions backup CI. GitForge is primary; this is the fallback. | ||
| # Docs-only changes get a fast whitespace/conflict-marker check and do not | ||
| # install Rust/Aegis/coverage tooling or run the full xtask gate. The workflow | ||
| # remains active for every PR/push so required checks are not path-filtered | ||
| # into a permanently pending state. | ||
| name: CI (backup) | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["**"] | ||
| tags: ["v*"] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| # Least privilege: this workflow only reads the repository. Declaring | ||
| # it explicitly keeps the default `GITHUB_TOKEN` from inheriting a | ||
| # broader (write) grant from the org/repo settings — the rule | ||
| # `actions/missing-workflow-permissions` fires without this block. | ||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| jobs: | ||
| changes: | ||
| name: classify-change | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| docs_only: ${{ steps.classify.outputs.docs_only }} | ||
| code_changed: ${{ steps.classify.outputs.code_changed }} | ||
| steps: | ||
| - name: Checkout full history | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Classify changed paths (fail closed on unknown/empty diff) | ||
| id: classify | ||
| shell: bash | ||
| env: | ||
| EVENT_NAME: ${{ github.event_name }} | ||
| REF: ${{ github.ref }} | ||
| BEFORE_SHA: ${{ github.event.before }} | ||
| PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| run: | | ||
| set -euo pipefail | ||
| if [[ "$EVENT_NAME" == "workflow_dispatch" || "$REF" == refs/tags/* ]]; then | ||
| echo "docs_only=false" >> "$GITHUB_OUTPUT" | ||
| echo "code_changed=true" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
| base="$BEFORE_SHA" | ||
| if [[ "$EVENT_NAME" == "pull_request" ]]; then base="$PR_BASE_SHA"; fi | ||
| if [[ -z "$base" || "$base" =~ ^0+$ ]] || ! git cat-file -e "$base^{commit}" 2>/dev/null; then | ||
| echo "docs_only=false" >> "$GITHUB_OUTPUT" | ||
| echo "code_changed=true" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
| if [[ "$EVENT_NAME" == "pull_request" ]]; then | ||
| files=$(git diff --name-only "$base...$GITHUB_SHA") | ||
| else | ||
| files=$(git diff --name-only "$base" "$GITHUB_SHA") | ||
| fi | ||
| if [[ -z "$files" ]]; then | ||
| echo "docs_only=false" >> "$GITHUB_OUTPUT" | ||
| echo "code_changed=true" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
| docs_only=true | ||
| while IFS= read -r file; do | ||
| [[ -z "$file" ]] && continue | ||
| case "$file" in | ||
| docs/*|README.md|CHANGELOG.md|CONTRIBUTING.md|LICENSE|CODE_OF_CONDUCT.md) ;; | ||
| *) docs_only=false; break ;; | ||
| esac | ||
| done <<< "$files" | ||
| echo "docs_only=$docs_only" >> "$GITHUB_OUTPUT" | ||
| if [[ "$docs_only" == "true" ]]; then | ||
| echo "code_changed=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "code_changed=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| printf 'Changed files:\n%s\n' "$files" | ||
| docs: | ||
| name: docs-only-check | ||
| runs-on: ubuntu-latest | ||
| needs: [changes] | ||
| if: needs.changes.outputs.docs_only == 'true' | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Validate whitespace and merge markers | ||
| run: | | ||
| set -euo pipefail | ||
| if grep -RInE '^(<<<<<<<|=======|>>>>>>>)' docs README.md CONTRIBUTING.md 2>/dev/null; then | ||
|
Comment on lines
+84
to
+87
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| echo "Unresolved merge-conflict marker found in documentation." | ||
| exit 1 | ||
| fi | ||
| fmt: | ||
| name: fmt | ||
| runs-on: ubuntu-latest | ||
| needs: [changes] | ||
| if: needs.changes.outputs.code_changed == 'true' | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rustfmt | ||
|
|
||
| - name: Check formatting | ||
| run: cargo fmt --all -- --check | ||
|
|
||
| # Also check the workspace-excluded web crate explicitly. | ||
| - name: Check web formatting | ||
| run: cargo fmt --manifest-path web/Cargo.toml -- --check | ||
|
|
||
| gate: | ||
| name: gate | ||
| runs-on: ubuntu-latest | ||
| needs: [fmt] | ||
| needs: [changes, fmt] | ||
| if: needs.changes.outputs.code_changed == 'true' | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: clippy, rustfmt | ||
|
|
||
| - name: Install aegis | ||
| - name: Install Aegis | ||
| run: | | ||
| # aegis 0.6.3 — must match the version pinned in the GitForge CI | ||
| # image, or the baseline findings shift and the gate fails on | ||
| # tool drift rather than on a real finding. | ||
| set -euo pipefail | ||
| url=https://github.com/aliasfoxkde/aegis/releases/download/v0.6.3/aegis-linux-x86_64.tar.gz | ||
| curl -sSL -o aegis.tar.gz "$url" | ||
| echo "835fad56172f8977a91424a580d0a3ec0c5b59fea99f4c2eb4c0a88fce30ff9e aegis.tar.gz" \ | ||
| | sha256sum -c - | ||
| echo "835fad56172f8977a91424a580d0a3ec0c5b59fea99f4c2eb4c0a88fce30ff9e aegis.tar.gz" | sha256sum -c - | ||
| tar xzf aegis.tar.gz aegis | ||
| sudo mv aegis /usr/local/bin/aegis | ||
| aegis --version | ||
|
|
||
| - name: Install wasm32 target | ||
| run: rustup target add wasm32-unknown-unknown | ||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/registry | ||
| key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Cache cargo index | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/git | ||
| key: cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Cache build artifacts | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: target | ||
| key: cargo-build-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: cargo-build-${{ runner.os }}- | ||
|
|
||
| # Cache cargo-llvm-cov and trunk binaries between runs (~2 min saved per run). | ||
| # --locked pins the version so the cache key matches the locked version. | ||
| - name: Cache cargo-llvm-cov | ||
| id: cache-llvc | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/bin/cargo-llvm-cov | ||
| key: cargo-llvm-cov-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Install cargo-llvm-cov (if uncached) | ||
| if: steps.cache-llvc.outputs.cache-hit != 'true' | ||
| run: cargo install cargo-llvm-cov --locked | ||
|
|
||
| - name: Cache trunk | ||
| id: cache-trunk | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/bin/trunk | ||
| key: trunk-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Install trunk (if uncached) | ||
| if: steps.cache-trunk.outputs.cache-hit != 'true' | ||
| run: cargo install trunk --locked | ||
|
|
||
| # `ci-no-fmt` skips the fmt step so the two jobs stay independent — | ||
| # fmt is owned by the `fmt` job above. | ||
| - name: Full gate (xtask ci-no-fmt) | ||
| run: cargo run --package xtask -- ci-no-fmt | ||
| continue-on-error: false | ||
|
|
||
| # Smoke for the web bundle — only runs on tag pushes (release candidates) | ||
| - name: Web bundle smoke | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| run: cargo run --package xtask -- dist --web | ||
| continue-on-error: false | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include rename source paths in change classification.
If a commit moves
Cargo.tomltodocs/archived-Cargo.toml, Git can report only the destination through--name-only. The classifier then accepts the change as documentation-only, although the workspace manifest was removed. Bothfmtandgateare skipped. Git enables rename detection by default and documents--name-onlyas reporting post-image paths. (git-scm.com)Add
--no-renamesto both diff commands. This makes the source deletion participate in classification.Proposed fix
Also applies to: 54-54